Docbook conversion of existing ext/pb_ds documentation.

2011-07-29  Benjamin Kosnik  <bkoz@redhat.com>

	Docbook conversion of existing ext/pb_ds documentation.
	* doc/Makefile.am (xml_sources_manual): Add
	policy_data_structures.xml and
	test_policy_data_structures.xml.
	(stamp-html-copy): Remove special-case for ext/pb_ds directory.
	(XSLTPROC_FLAGS): Split into XSLT_FLAGS and XSLT_PARAM, use.
	* doc/Makefile.in: Regenerate.
	* doc/xml/manual/policy_data_structures.xml: New, adapted from
	  previous html-only instance in doc/html/ext/pb_ds.
	* doc/xml/manual/test_policy_data_structures.xml: New, same as above.

	* doc/xml/spine.xml: Update copyright.
	* doc/xml/manual/spine.xml: Same.
	* doc/xml/manual/extensions.xml: Adjust set, chapter, sections.
	* doc/xml/manual/bitmap_allocator.xml: Same.
	* doc/xml/manual/mt_allocator.xml: Same.

	Populate image directory.
	* doc/xml/images/(pbds_balls_and_bins.png,
	pbds_binary_priority_queue_random_int_push_timing_test_local.pdf,
	pbds_binary_priority_queue_random_int_push_timing_test_local.png,
	pbds_binary_priority_queue_random_int_push_timing_test_local.svg,
	pbds_cc_hash_random_int_find_timing_test_local.pdf,
	pbds_cc_hash_random_int_find_timing_test_local.png,
	pbds_cc_hash_random_int_find_timing_test_local.svg,
	pbds_cc_hash_random_int_subscript_timing_test_find_local.pdf,
	pbds_cc_hash_random_int_subscript_timing_test_find_local.png,
	pbds_cc_hash_random_int_subscript_timing_test_find_local.svg,
	pbds_cc_hash_random_int_subscript_timing_test_insert_local.pdf,
	pbds_cc_hash_random_int_subscript_timing_test_insert_local.png,
	pbds_cc_hash_random_int_subscript_timing_test_insert_local.svg,
	pbds_container_tag_hierarchy.pdf,
	pbds_container_tag_hierarchy.png,
	pbds_container_tag_hierarchy.svg,
	pbds_different_underlying_dss_1.png,
	pbds_different_underlying_dss_2.png,
	pbds_embedded_lists_1.png, pbds_embedded_lists_2.png,
	pbds_embedded_lists_3.png, pbds_exception_hierarchy.pdf,
	pbds_exception_hierarchy.png, pbds_exception_hierarchy.svg,
	pbds_gp_hash_random_int_find_timing_test_local.pdf,
	pbds_gp_hash_random_int_find_timing_test_local.png,
	pbds_gp_hash_random_int_find_timing_test_local.svg,
	pbds_gp_hash_random_int_subscript_timing_test_find_local.pdf,
	pbds_gp_hash_random_int_subscript_timing_test_find_local.png,
	pbds_gp_hash_random_int_subscript_timing_test_find_local.svg,
	pbds_gp_hash_random_int_subscript_timing_test_insert_local.pdf,
	pbds_gp_hash_random_int_subscript_timing_test_insert_local.png,
	pbds_gp_hash_random_int_subscript_timing_test_insert_local.svg,
	pbds_hash_policy_cd.png,
	pbds_hash_random_int_erase_mem_usage_test_local.pdf,
	pbds_hash_random_int_erase_mem_usage_test_local.png,
	pbds_hash_random_int_erase_mem_usage_test_local.svg,
	pbds_hash_ranged_hash_range_hashing_fns.png,
	pbds_hash_range_hashing_seq_diagram2.png,
	pbds_hash_range_hashing_seq_diagram.png,
	pbds_hash_zlob_random_int_find_timing_test_local.pdf,
	pbds_hash_zlob_random_int_find_timing_test_local.png,
	pbds_hash_zlob_random_int_find_timing_test_local.svg,
	pbds_insert_resize_sequence_diagram1.png,
	pbds_insert_resize_sequence_diagram2.png,
	pbds_insert_resize_sequence_diagram3.png,
	pbds_invalidation_guarantee_erase.png,
	pbds_invalidation_tag_hierarchy.pdf,
	pbds_invalidation_tag_hierarchy.png,
	pbds_invalidation_tag_hierarchy.svg, pbds_list_update.png,
	pbds_multimap_text_find_timing_test_large_s2p_hash_local.pdf,
	pbds_multimap_text_find_timing_test_large_s2p_hash_local.png,
	pbds_multimap_text_find_timing_test_large_s2p_hash_local.svg,
	pbds_multimap_text_find_timing_test_large_s2p_tree_local.pdf,
	pbds_multimap_text_find_timing_test_large_s2p_tree_local.png,
	pbds_multimap_text_find_timing_test_large_s2p_tree_local.svg,
	pbds_multimap_text_find_timing_test_small_s2p_hash_local.pdf,
	pbds_multimap_text_find_timing_test_small_s2p_hash_local.png,
	pbds_multimap_text_find_timing_test_small_s2p_hash_local.svg,
	pbds_multimap_text_find_timing_test_small_s2p_tree_local.pdf,
	pbds_multimap_text_find_timing_test_small_s2p_tree_local.png,
	pbds_multimap_text_find_timing_test_small_s2p_tree_local.svg,
	pbds_multimap_text_insert_mem_usage_test_large_s2p_hash_local.pdf,
	pbds_multimap_text_insert_mem_usage_test_large_s2p_hash_local.png,
	pbds_multimap_text_insert_mem_usage_test_large_s2p_hash_local.svg,
	pbds_multimap_text_insert_mem_usage_test_large_s2p_tree_local.pdf,
	pbds_multimap_text_insert_mem_usage_test_large_s2p_tree_local.png,
	pbds_multimap_text_insert_mem_usage_test_large_s2p_tree_local.svg,
	pbds_multimap_text_insert_mem_usage_test_small_s2p_hash_local.pdf,
	pbds_multimap_text_insert_mem_usage_test_small_s2p_hash_local.png,
	pbds_multimap_text_insert_mem_usage_test_small_s2p_hash_local.svg,
	pbds_multimap_text_insert_mem_usage_test_small_s2p_tree_local.pdf,
	pbds_multimap_text_insert_mem_usage_test_small_s2p_tree_local.png,
	pbds_multimap_text_insert_mem_usage_test_small_s2p_tree_local.svg,
	pbds_multimap_text_insert_timing_test_large_s2p_hash_local.pdf,
	pbds_multimap_text_insert_timing_test_large_s2p_hash_local.png,
	pbds_multimap_text_insert_timing_test_large_s2p_hash_local.svg,
	pbds_multimap_text_insert_timing_test_large_s2p_tree_local.pdf,
	pbds_multimap_text_insert_timing_test_large_s2p_tree_local.png,
	pbds_multimap_text_insert_timing_test_large_s2p_tree_local.svg,
	pbds_multimap_text_insert_timing_test_small_s2p_hash_local.pdf,
	pbds_multimap_text_insert_timing_test_small_s2p_hash_local.png,
	pbds_multimap_text_insert_timing_test_small_s2p_hash_local.svg,
	pbds_multimap_text_insert_timing_test_small_s2p_tree_local.pdf,
	pbds_multimap_text_insert_timing_test_small_s2p_tree_local.png,
	pbds_multimap_text_insert_timing_test_small_s2p_tree_local.svg,
	pbds_node_invariants.png,
	pbds_pairing_priority_queue_text_push_pop_timing_test_local.pdf,
	pbds_pairing_priority_queue_text_push_pop_timing_test_local.png,
	pbds_pairing_priority_queue_text_push_pop_timing_test_local.svg,
	pbds_pairing_priority_queue_text_push_timing_test_local.pdf,
	pbds_pairing_priority_queue_text_push_timing_test_local.png,
	pbds_pairing_priority_queue_text_push_timing_test_local.svg,
	pbds_pat_trie.png, pbds_point_iterator_hierarchy.png,
	pbds_point_iterators_range_ops_1.png,
	pbds_point_iterators_range_ops_2.png,
	pbds_priority_queue_different_underlying_dss.png,
	pbds_priority_queue_random_int_push_pop_timing_test_local.pdf,
	pbds_priority_queue_random_int_push_pop_timing_test_local.png,
	pbds_priority_queue_random_int_push_pop_timing_test_local.svg,
	pbds_priority_queue_random_int_push_timing_test_local.pdf,
	pbds_priority_queue_random_int_push_timing_test_local.png,
	pbds_priority_queue_random_int_push_timing_test_local.svg,
	pbds_priority_queue_tag_hierarchy.pdf,
	pbds_priority_queue_tag_hierarchy.png,
	pbds_priority_queue_tag_hierarchy.svg,
	pbds_priority_queue_text_join_timing_test_local.pdf,
	pbds_priority_queue_text_join_timing_test_local.png,
	pbds_priority_queue_text_join_timing_test_local.svg,
	pbds_priority_queue_text_modify_down_timing_test_local.pdf,
	pbds_priority_queue_text_modify_down_timing_test_local.png,
	pbds_priority_queue_text_modify_down_timing_test_local.svg,
	pbds_priority_queue_text_modify_down_timing_test_pairing_thin_local.pdf,
	pbds_priority_queue_text_modify_down_timing_test_pairing_thin_local.png,
	pbds_priority_queue_text_modify_down_timing_test_pairing_thin_local.svg,
	pbds_priority_queue_text_modify_up_timing_test_local.pdf,
	pbds_priority_queue_text_modify_up_timing_test_local.png,
	pbds_priority_queue_text_modify_up_timing_test_local.svg,
	pbds_priority_queue_text_modify_up_timing_test_pairing_thin_local.pdf,
	pbds_priority_queue_text_modify_up_timing_test_pairing_thin_local.png,
	pbds_priority_queue_text_modify_up_timing_test_pairing_thin_local.svg,
	pbds_priority_queue_text_pop_mem_usage_test_local.pdf,
	pbds_priority_queue_text_pop_mem_usage_test_local.png,
	pbds_priority_queue_text_pop_mem_usage_test_local.svg,
	pbds_priority_queue_text_push_pop_timing_test_local.pdf,
	pbds_priority_queue_text_push_pop_timing_test_local.png,
	pbds_priority_queue_text_push_pop_timing_test_local.svg,
	pbds_priority_queue_text_push_timing_test_local.pdf,
	pbds_priority_queue_text_push_timing_test_local.png,
	pbds_priority_queue_text_push_timing_test_local.svg,
	pbds_rationale_null_node_updator.png,
	pbds_resize_policy_cd.png, pbds_restoring_node_invariants.png,
	pbds_simple_list.png,
	pbds_text_find_timing_test_hash_local.pdf,
	pbds_text_find_timing_test_hash_local.png,
	pbds_text_find_timing_test_hash_local.svg,
	pbds_text_find_timing_test_tree_like_local.pdf,
	pbds_text_find_timing_test_tree_like_local.png,
	pbds_text_find_timing_test_tree_like_local.svg,
	pbds_tree_node_invalidations.png,
	pbds_tree_node_invariants.png,
	pbds_tree_node_updator_policy_cd.png,
	pbds_tree_order_statistics_timing_test_local.pdf,
	pbds_tree_order_statistics_timing_test_local.png,
	pbds_tree_order_statistics_timing_test_local.svg,
	pbds_tree_split_join_timing_test_local.pdf,
	pbds_tree_split_join_timing_test_local.png,
	pbds_tree_split_join_timing_test_local.svg,
	pbds_tree_text_insert_timing_test_node_tree_local.pdf,
	pbds_tree_text_insert_timing_test_node_tree_local.png,
	pbds_tree_text_insert_timing_test_node_tree_local.svg,
	pbds_tree_text_insert_timing_test_pat_trie_local.pdf,
	pbds_tree_text_insert_timing_test_pat_trie_local.png,
	pbds_tree_text_insert_timing_test_pat_trie_local.svg,
	pbds_tree_text_insert_timing_test_vector_tree_local.pdf,
	pbds_tree_text_insert_timing_test_vector_tree_local.png,
	pbds_tree_text_insert_timing_test_vector_tree_local.svg,
	pbds_tree_text_lor_find_timing_test_local.pdf,
	pbds_tree_text_lor_find_timing_test_local.png,
	pbds_tree_text_lor_find_timing_test_local.svg,
	pbds_trie_node_updator_policy_cd.png,
	pbds_update_seq_diagram.png): Add.

	* doc/html/ext/pb_ds: Remove.
	* doc/html/ext/pb_ds/(acks.html, assoc_container_tag_cd.png,
	assoc_container_tag_cd.svg, assoc_container_traits.html,
	assoc_design.html, assoc_examples.html,
	associative_container_tag.html, assoc_performance_tests.html,
	assoc_regression_tests.html, assoc_tests.html,
	balls_and_bins.png, basic_hash_table.html,
	basic_hash_tag.html, basic_invalidation_guarantee.html,
	basic_tree_assoc_container_const_node_iterator.html,
	basic_tree.html, basic_tree_tag.html, binary_heap_tag.html,
	binary_priority_queue_random_int_push_timing_test_gcc.png,
	binary_priority_queue_random_int_push_timing_test_local.png,
	binary_priority_queue_random_int_push_timing_test_msvc.png,
	binomial_heap_tag.html,
	ccgp_hash_random_int_subscript_timing_test_insert_gcc.png,
	ccgp_hash_random_int_subscript_timing_test_insert_local.png,
	ccgp_hash_random_int_subscript_timing_test_insert_msvc.png,
	cc_hash_max_collision_check_resize_trigger.html,
	cc_hash_random_int_find_timing_test_gcc.png,
	cc_hash_random_int_find_timing_test_local.png,
	cc_hash_random_int_find_timing_test_msvc.png,
	cc_hash_random_int_subscript_timing_test_find_gcc.png,
	cc_hash_random_int_subscript_timing_test_find_local.png,
	cc_hash_random_int_subscript_timing_test_find_msvc.png,
	cc_hash_random_int_subscript_timing_test_insert_gcc.png,
	cc_hash_random_int_subscript_timing_test_insert_local.png,
	cc_hash_random_int_subscript_timing_test_insert_msvc.png,
	cc_hash_table.html, cc_hash_tag.html, checked_by_tidy.gif
	concepts.html, contact.html, container_base.html,
	container_cd.png, container_cd.svg, container_tag.html,
	counter_lu_policy.html, design.html,
	different_underlying_dss.png, direct_mask_range_hashing.html,
	direct_mod_range_hashing.html, disclaimer.html, ds_gen.html,
	embedded_lists_1.png, embedded_lists_2.png,
	embedded_lists_3.png, examples.html, exceptions.html,
	gp_hash_random_int_find_timing_test_gcc.png,
	gp_hash_random_int_find_timing_test_local.png,
	gp_hash_random_int_find_timing_test_msvc.png,
	gp_hash_random_int_subscript_timing_test_find_gcc.png,
	gp_hash_random_int_subscript_timing_test_find_local.png,
	gp_hash_random_int_subscript_timing_test_find_msvc.png,
	gp_hash_random_int_subscript_timing_test_insert_gcc.png,
	gp_hash_random_int_subscript_timing_test_insert_local.png,
	gp_hash_random_int_subscript_timing_test_insert_msvc.png,
	gp_hash_table.html, gp_hash_tag.html,
	hash_based_containers.html, hash_exponential_size_policy.html,
	hash_load_check_resize_trigger.html, hash_policy_cd.png,
	hash_prime_size_policy.html,
	hash_random_int_erase_mem_usage_test_gcc.png,
	hash_random_int_erase_mem_usage_test.html,
	hash_random_int_erase_mem_usage_test_local.png,
	hash_random_int_erase_mem_usage_test_msvc.png,
	hash_random_int_find_find_timing_test.html,
	hash_random_int_subscript_find_timing_test.html,
	hash_random_int_subscript_insert_timing_test.html,
	hash_ranged_hash_range_hashing_fns.png,
	hash_range_hashing_seq_diagram2.png,
	hash_range_hashing_seq_diagram.png,
	hash_standard_resize_policy.html,
	hash_text_find_find_timing_test.html,
	hash_zlob_random_int_find_find_timing_test.html,
	hash_zlob_random_int_find_timing_test_gcc.png,
	hash_zlob_random_int_find_timing_test_local.png,
	hash_zlob_random_int_find_timing_test_msvc.png, index.html,
	insert_error.html, insert_resize_sequence_diagram1.png,
	insert_resize_sequence_diagram2.png,
	insert_resize_sequence_diagram3.png, interface.html,
	introduction.html, invalidation_guarantee_cd.png,
	invalidation_guarantee_erase.png, join_error.html,
	linear_probe_fn.html, list_update.html, list_update_tag.html,
	lu_based_containers.html, lu.png, misc.html, motivation.html,
	move_to_front_lu_policy.html,
	multimap_text_find_timing_test_large.html,
	multimap_text_find_timing_test_large_s2p_hash_gcc.png,
	multimap_text_find_timing_test_large_s2p_hash_local.png,
	multimap_text_find_timing_test_large_s2p_hash_msvc.png,
	multimap_text_find_timing_test_large_s2p_tree_gcc.png,
	multimap_text_find_timing_test_large_s2p_tree_local.png,
	multimap_text_find_timing_test_large_s2p_tree_msvc.png,
	multimap_text_find_timing_test_small.html,
	multimap_text_find_timing_test_small_s2p_hash_gcc.png,
	multimap_text_find_timing_test_small_s2p_hash_local.png,
	multimap_text_find_timing_test_small_s2p_hash_msvc.png,
	multimap_text_find_timing_test_small_s2p_tree_gcc.png,
	multimap_text_find_timing_test_small_s2p_tree_local.png,
	multimap_text_find_timing_test_small_s2p_tree_msvc.png,
	multimap_text_insert_mem_usage_test_large.html,
	multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png,
	multimap_text_insert_mem_usage_test_large_s2p_hash_local.png,
	multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png,
	multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png,
	multimap_text_insert_mem_usage_test_large_s2p_tree_local.png,
	multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png,
	multimap_text_insert_mem_usage_test_small.html,
	multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png,
	multimap_text_insert_mem_usage_test_small_s2p_hash_local.png,
	multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png,
	multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png,
	multimap_text_insert_mem_usage_test_small_s2p_tree_local.png,
	multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png,
	multimap_text_insert_timing_test_large.html,
	multimap_text_insert_timing_test_large_s2p_hash_gcc.png,
	multimap_text_insert_timing_test_large_s2p_hash_local.png,
	multimap_text_insert_timing_test_large_s2p_hash_msvc.png,
	multimap_text_insert_timing_test_large_s2p_tree_gcc.png,
	multimap_text_insert_timing_test_large_s2p_tree_local.png,
	multimap_text_insert_timing_test_large_s2p_tree_msvc.png,
	multimap_text_insert_timing_test_small.html,
	multimap_text_insert_timing_test_small_s2p_hash_gcc.png,
	multimap_text_insert_timing_test_small_s2p_hash_local.png,
	multimap_text_insert_timing_test_small_s2p_hash_msvc.png,
	multimap_text_insert_timing_test_small_s2p_tree_gcc.png,
	multimap_text_insert_timing_test_small_s2p_tree_local.png,
	multimap_text_insert_timing_test_small_s2p_tree_msvc.png,
	node_invariant_invalidations.png, node_invariants.png,
	null_hash_fn.html, null_lu_metadata.html,
	null_mapped_type.html, null_probe_fn.html,
	null_tree_node_update.html, null_trie_node_update.html,
	ov_tree_tag.html, pairing_heap_tag.html,
	pairing_priority_queue_text_push_pop_timing_test_gcc.png,
	pairing_priority_queue_text_push_pop_timing_test_local.png,
	pairing_priority_queue_text_push_pop_timing_test_msvc.png,
	pairing_priority_queue_text_push_timing_test_gcc.png,
	pairing_priority_queue_text_push_timing_test_local.png,
	pairing_priority_queue_text_push_timing_test_msvc.png,
	pat_trie.png, pat_trie_tag.html,
	point_invalidation_guarantee.html, point_iterators_cd.png,
	point_iterators_range_ops_1.png,
	point_iterators_range_ops_2.png, pq_container_traits.html,
	pq_design.html, pq_different_underlying_dss.png,
	pq_examples.html, pq_performance_tests.html,
	pq_regression_tests.html, pq_tests.html, prerequisites.html,
	priority_queue.html,
	priority_queue_random_int_push_pop_timing_test_gcc.png,
	priority_queue_random_int_push_pop_timing_test.html,
	priority_queue_random_int_push_pop_timing_test_local.png,
	priority_queue_random_int_push_pop_timing_test_msvc.png,
	priority_queue_random_int_push_timing_test_gcc.png,
	priority_queue_random_int_push_timing_test.html,
	priority_queue_random_int_push_timing_test_local.png,
	priority_queue_random_int_push_timing_test_msvc.png,
	priority_queue_tag_cd.png, priority_queue_tag_cd.svg,
	priority_queue_tag.html,
	priority_queue_text_join_timing_test_gcc.png,
	priority_queue_text_join_timing_test.html,
	priority_queue_text_join_timing_test_local.png,
	priority_queue_text_join_timing_test_msvc.png,
	priority_queue_text_modify_down_timing_test_gcc.png,
	priority_queue_text_modify_down_timing_test.html,
	priority_queue_text_modify_down_timing_test_local.png,
	priority_queue_text_modify_down_timing_test_msvc.png,
	priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png,
	priority_queue_text_modify_down_timing_test_pairing_thin_local.png,
	priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png,
	priority_queue_text_modify_up_timing_test_gcc.png,
	priority_queue_text_modify_up_timing_test.html,
	priority_queue_text_modify_up_timing_test_local.png,
	priority_queue_text_modify_up_timing_test_msvc.png,
	priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png,
	priority_queue_text_modify_up_timing_test_pairing_thin_local.png,
	priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png,
	priority_queue_text_pop_mem_usage_test_gcc.png,
	priority_queue_text_pop_mem_usage_test.html,
	priority_queue_text_pop_mem_usage_test_local.png,
	priority_queue_text_pop_mem_usage_test_msvc.png,
	priority_queue_text_push_pop_timing_test_gcc.png,
	priority_queue_text_push_pop_timing_test.html,
	priority_queue_text_push_pop_timing_test_local.png,
	priority_queue_text_push_pop_timing_test_msvc.png,
	priority_queue_text_push_timing_test_gcc.png,
	priority_queue_text_push_timing_test.html,
	priority_queue_text_push_timing_test_local.png,
	priority_queue_text_push_timing_test_msvc.png,
	PythonPoweredSmall.gif quadratic_probe_fn.html,
	random_int_find_find_timing_test_tree_gcc.png,
	random_int_find_find_timing_test_tree_local.png,
	random_int_find_find_timing_test_tree_msvc.png,
	range_invalidation_guarantee.html,
	rationale_null_node_updator.png, rb_tree_tag.html,
	rc_binomial_heap_tag.html, references.html, resize_error.html,
	resize_policy_cd.png, restoring_node_invariants.png,
	sample_probe_fn.html, sample_ranged_hash_fn.html,
	sample_ranged_probe_fn.html, sample_range_hashing.html,
	sample_resize_policy.html, sample_resize_trigger.html,
	sample_size_policy.html, sample_tree_node_update.html,
	sample_trie_access_traits.html, sample_trie_node_update.html,
	sample_update_policy.html, simple_list.png,
	splay_tree_tag.html, tests.html,
	text_find_timing_test_hash_gcc.png,
	text_find_timing_test_hash_local.png,
	text_find_timing_test_hash_msvc.png,
	text_find_timing_test_tree_like_gcc.png,
	text_find_timing_test_tree_like_local.png,
	text_find_timing_test_tree_like_msvc.png, thin_heap_tag.html,
	tree_based_containers.html, tree.html,
	tree_node_iterator.html, tree_node_updator_policy_cd.png,
	tree_order_statistics_node_update.html,
	tree_order_statistics_timing_test_gcc.png,
	tree_order_statistics_timing_test.html,
	tree_order_statistics_timing_test_local.png,
	tree_order_statistics_timing_test_msvc.png,
	tree_random_int_find_find_timing_test.html,
	tree_split_join_timing_test_gcc.png,
	tree_split_join_timing_test.html,
	tree_split_join_timing_test_local.png,
	tree_split_join_timing_test_msvc.png, tree_tag.html,
	tree_text_find_find_timing_test.html,
	tree_text_insert_timing_test.html,
	tree_text_insert_timing_test_node_tree_gcc.png,
	tree_text_insert_timing_test_node_tree_local.png,
	tree_text_insert_timing_test_node_tree_msvc.png,
	tree_text_insert_timing_test_pat_trie_gcc.png,
	tree_text_insert_timing_test_pat_trie_local.png,
	tree_text_insert_timing_test_pat_trie_msvc.png,
	tree_text_insert_timing_test_vector_tree_gcc.png,
	tree_text_insert_timing_test_vector_tree_local.png,
	tree_text_insert_timing_test_vector_tree_msvc.png,
	tree_text_lor_find_find_timing_test.html,
	tree_text_lor_find_timing_test_gcc.png,
	tree_text_lor_find_timing_test_local.png,
	tree_text_lor_find_timing_test_msvc.png,
	trie_based_containers.html, trie_const_node_iterator.html,
	trie.html, trie_node_iterator.html,
	trie_node_updator_policy_cd.png,
	trie_order_statistics_node_update.html,
	trie_prefix_search_node_update.html,
	trie_string_access_traits.html, trie_tag.html,
	trivial_iterator_tag.html, tutorial.html,
	update_policy_cd.png, update_seq_diagram.png): Remove.

From-SVN: r176952
This commit is contained in:
Benjamin Kosnik 2011-07-29 22:31:30 +00:00 committed by Benjamin Kosnik
parent cc822cc1f3
commit ce1140e3f2
444 changed files with 36092 additions and 30433 deletions

View File

@ -1,3 +1,413 @@
2011-07-29 Benjamin Kosnik <bkoz@redhat.com>
Docbook conversion of existing ext/pb_ds documentation.
* doc/Makefile.am (xml_sources_manual): Add
policy_data_structures.xml and
test_policy_data_structures.xml.
(stamp-html-copy): Remove special-case for ext/pb_ds directory.
(XSLTPROC_FLAGS): Split into XSLT_FLAGS and XSLT_PARAM, use.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/policy_data_structures.xml: New, adapted from
previous html-only instance in doc/html/ext/pb_ds.
* doc/xml/manual/test_policy_data_structures.xml: New, same as above.
* doc/xml/spine.xml: Update copyright.
* doc/xml/manual/spine.xml: Same.
* doc/xml/manual/extensions.xml: Adjust set, chapter, sections.
* doc/xml/manual/bitmap_allocator.xml: Same.
* doc/xml/manual/mt_allocator.xml: Same.
Populate image directory.
* doc/xml/images/(pbds_balls_and_bins.png,
pbds_binary_priority_queue_random_int_push_timing_test_local.pdf,
pbds_binary_priority_queue_random_int_push_timing_test_local.png,
pbds_binary_priority_queue_random_int_push_timing_test_local.svg,
pbds_cc_hash_random_int_find_timing_test_local.pdf,
pbds_cc_hash_random_int_find_timing_test_local.png,
pbds_cc_hash_random_int_find_timing_test_local.svg,
pbds_cc_hash_random_int_subscript_timing_test_find_local.pdf,
pbds_cc_hash_random_int_subscript_timing_test_find_local.png,
pbds_cc_hash_random_int_subscript_timing_test_find_local.svg,
pbds_cc_hash_random_int_subscript_timing_test_insert_local.pdf,
pbds_cc_hash_random_int_subscript_timing_test_insert_local.png,
pbds_cc_hash_random_int_subscript_timing_test_insert_local.svg,
pbds_container_tag_hierarchy.pdf,
pbds_container_tag_hierarchy.png,
pbds_container_tag_hierarchy.svg,
pbds_different_underlying_dss_1.png,
pbds_different_underlying_dss_2.png,
pbds_embedded_lists_1.png, pbds_embedded_lists_2.png,
pbds_embedded_lists_3.png, pbds_exception_hierarchy.pdf,
pbds_exception_hierarchy.png, pbds_exception_hierarchy.svg,
pbds_gp_hash_random_int_find_timing_test_local.pdf,
pbds_gp_hash_random_int_find_timing_test_local.png,
pbds_gp_hash_random_int_find_timing_test_local.svg,
pbds_gp_hash_random_int_subscript_timing_test_find_local.pdf,
pbds_gp_hash_random_int_subscript_timing_test_find_local.png,
pbds_gp_hash_random_int_subscript_timing_test_find_local.svg,
pbds_gp_hash_random_int_subscript_timing_test_insert_local.pdf,
pbds_gp_hash_random_int_subscript_timing_test_insert_local.png,
pbds_gp_hash_random_int_subscript_timing_test_insert_local.svg,
pbds_hash_policy_cd.png,
pbds_hash_random_int_erase_mem_usage_test_local.pdf,
pbds_hash_random_int_erase_mem_usage_test_local.png,
pbds_hash_random_int_erase_mem_usage_test_local.svg,
pbds_hash_ranged_hash_range_hashing_fns.png,
pbds_hash_range_hashing_seq_diagram2.png,
pbds_hash_range_hashing_seq_diagram.png,
pbds_hash_zlob_random_int_find_timing_test_local.pdf,
pbds_hash_zlob_random_int_find_timing_test_local.png,
pbds_hash_zlob_random_int_find_timing_test_local.svg,
pbds_insert_resize_sequence_diagram1.png,
pbds_insert_resize_sequence_diagram2.png,
pbds_insert_resize_sequence_diagram3.png,
pbds_invalidation_guarantee_erase.png,
pbds_invalidation_tag_hierarchy.pdf,
pbds_invalidation_tag_hierarchy.png,
pbds_invalidation_tag_hierarchy.svg, pbds_list_update.png,
pbds_multimap_text_find_timing_test_large_s2p_hash_local.pdf,
pbds_multimap_text_find_timing_test_large_s2p_hash_local.png,
pbds_multimap_text_find_timing_test_large_s2p_hash_local.svg,
pbds_multimap_text_find_timing_test_large_s2p_tree_local.pdf,
pbds_multimap_text_find_timing_test_large_s2p_tree_local.png,
pbds_multimap_text_find_timing_test_large_s2p_tree_local.svg,
pbds_multimap_text_find_timing_test_small_s2p_hash_local.pdf,
pbds_multimap_text_find_timing_test_small_s2p_hash_local.png,
pbds_multimap_text_find_timing_test_small_s2p_hash_local.svg,
pbds_multimap_text_find_timing_test_small_s2p_tree_local.pdf,
pbds_multimap_text_find_timing_test_small_s2p_tree_local.png,
pbds_multimap_text_find_timing_test_small_s2p_tree_local.svg,
pbds_multimap_text_insert_mem_usage_test_large_s2p_hash_local.pdf,
pbds_multimap_text_insert_mem_usage_test_large_s2p_hash_local.png,
pbds_multimap_text_insert_mem_usage_test_large_s2p_hash_local.svg,
pbds_multimap_text_insert_mem_usage_test_large_s2p_tree_local.pdf,
pbds_multimap_text_insert_mem_usage_test_large_s2p_tree_local.png,
pbds_multimap_text_insert_mem_usage_test_large_s2p_tree_local.svg,
pbds_multimap_text_insert_mem_usage_test_small_s2p_hash_local.pdf,
pbds_multimap_text_insert_mem_usage_test_small_s2p_hash_local.png,
pbds_multimap_text_insert_mem_usage_test_small_s2p_hash_local.svg,
pbds_multimap_text_insert_mem_usage_test_small_s2p_tree_local.pdf,
pbds_multimap_text_insert_mem_usage_test_small_s2p_tree_local.png,
pbds_multimap_text_insert_mem_usage_test_small_s2p_tree_local.svg,
pbds_multimap_text_insert_timing_test_large_s2p_hash_local.pdf,
pbds_multimap_text_insert_timing_test_large_s2p_hash_local.png,
pbds_multimap_text_insert_timing_test_large_s2p_hash_local.svg,
pbds_multimap_text_insert_timing_test_large_s2p_tree_local.pdf,
pbds_multimap_text_insert_timing_test_large_s2p_tree_local.png,
pbds_multimap_text_insert_timing_test_large_s2p_tree_local.svg,
pbds_multimap_text_insert_timing_test_small_s2p_hash_local.pdf,
pbds_multimap_text_insert_timing_test_small_s2p_hash_local.png,
pbds_multimap_text_insert_timing_test_small_s2p_hash_local.svg,
pbds_multimap_text_insert_timing_test_small_s2p_tree_local.pdf,
pbds_multimap_text_insert_timing_test_small_s2p_tree_local.png,
pbds_multimap_text_insert_timing_test_small_s2p_tree_local.svg,
pbds_node_invariants.png,
pbds_pairing_priority_queue_text_push_pop_timing_test_local.pdf,
pbds_pairing_priority_queue_text_push_pop_timing_test_local.png,
pbds_pairing_priority_queue_text_push_pop_timing_test_local.svg,
pbds_pairing_priority_queue_text_push_timing_test_local.pdf,
pbds_pairing_priority_queue_text_push_timing_test_local.png,
pbds_pairing_priority_queue_text_push_timing_test_local.svg,
pbds_pat_trie.png, pbds_point_iterator_hierarchy.png,
pbds_point_iterators_range_ops_1.png,
pbds_point_iterators_range_ops_2.png,
pbds_priority_queue_different_underlying_dss.png,
pbds_priority_queue_random_int_push_pop_timing_test_local.pdf,
pbds_priority_queue_random_int_push_pop_timing_test_local.png,
pbds_priority_queue_random_int_push_pop_timing_test_local.svg,
pbds_priority_queue_random_int_push_timing_test_local.pdf,
pbds_priority_queue_random_int_push_timing_test_local.png,
pbds_priority_queue_random_int_push_timing_test_local.svg,
pbds_priority_queue_tag_hierarchy.pdf,
pbds_priority_queue_tag_hierarchy.png,
pbds_priority_queue_tag_hierarchy.svg,
pbds_priority_queue_text_join_timing_test_local.pdf,
pbds_priority_queue_text_join_timing_test_local.png,
pbds_priority_queue_text_join_timing_test_local.svg,
pbds_priority_queue_text_modify_down_timing_test_local.pdf,
pbds_priority_queue_text_modify_down_timing_test_local.png,
pbds_priority_queue_text_modify_down_timing_test_local.svg,
pbds_priority_queue_text_modify_down_timing_test_pairing_thin_local.pdf,
pbds_priority_queue_text_modify_down_timing_test_pairing_thin_local.png,
pbds_priority_queue_text_modify_down_timing_test_pairing_thin_local.svg,
pbds_priority_queue_text_modify_up_timing_test_local.pdf,
pbds_priority_queue_text_modify_up_timing_test_local.png,
pbds_priority_queue_text_modify_up_timing_test_local.svg,
pbds_priority_queue_text_modify_up_timing_test_pairing_thin_local.pdf,
pbds_priority_queue_text_modify_up_timing_test_pairing_thin_local.png,
pbds_priority_queue_text_modify_up_timing_test_pairing_thin_local.svg,
pbds_priority_queue_text_pop_mem_usage_test_local.pdf,
pbds_priority_queue_text_pop_mem_usage_test_local.png,
pbds_priority_queue_text_pop_mem_usage_test_local.svg,
pbds_priority_queue_text_push_pop_timing_test_local.pdf,
pbds_priority_queue_text_push_pop_timing_test_local.png,
pbds_priority_queue_text_push_pop_timing_test_local.svg,
pbds_priority_queue_text_push_timing_test_local.pdf,
pbds_priority_queue_text_push_timing_test_local.png,
pbds_priority_queue_text_push_timing_test_local.svg,
pbds_rationale_null_node_updator.png,
pbds_resize_policy_cd.png, pbds_restoring_node_invariants.png,
pbds_simple_list.png,
pbds_text_find_timing_test_hash_local.pdf,
pbds_text_find_timing_test_hash_local.png,
pbds_text_find_timing_test_hash_local.svg,
pbds_text_find_timing_test_tree_like_local.pdf,
pbds_text_find_timing_test_tree_like_local.png,
pbds_text_find_timing_test_tree_like_local.svg,
pbds_tree_node_invalidations.png,
pbds_tree_node_invariants.png,
pbds_tree_node_updator_policy_cd.png,
pbds_tree_order_statistics_timing_test_local.pdf,
pbds_tree_order_statistics_timing_test_local.png,
pbds_tree_order_statistics_timing_test_local.svg,
pbds_tree_split_join_timing_test_local.pdf,
pbds_tree_split_join_timing_test_local.png,
pbds_tree_split_join_timing_test_local.svg,
pbds_tree_text_insert_timing_test_node_tree_local.pdf,
pbds_tree_text_insert_timing_test_node_tree_local.png,
pbds_tree_text_insert_timing_test_node_tree_local.svg,
pbds_tree_text_insert_timing_test_pat_trie_local.pdf,
pbds_tree_text_insert_timing_test_pat_trie_local.png,
pbds_tree_text_insert_timing_test_pat_trie_local.svg,
pbds_tree_text_insert_timing_test_vector_tree_local.pdf,
pbds_tree_text_insert_timing_test_vector_tree_local.png,
pbds_tree_text_insert_timing_test_vector_tree_local.svg,
pbds_tree_text_lor_find_timing_test_local.pdf,
pbds_tree_text_lor_find_timing_test_local.png,
pbds_tree_text_lor_find_timing_test_local.svg,
pbds_trie_node_updator_policy_cd.png,
pbds_update_seq_diagram.png): Add.
* doc/html/ext/pb_ds: Remove.
* doc/html/ext/pb_ds/(acks.html, assoc_container_tag_cd.png,
assoc_container_tag_cd.svg, assoc_container_traits.html,
assoc_design.html, assoc_examples.html,
associative_container_tag.html, assoc_performance_tests.html,
assoc_regression_tests.html, assoc_tests.html,
balls_and_bins.png, basic_hash_table.html,
basic_hash_tag.html, basic_invalidation_guarantee.html,
basic_tree_assoc_container_const_node_iterator.html,
basic_tree.html, basic_tree_tag.html, binary_heap_tag.html,
binary_priority_queue_random_int_push_timing_test_gcc.png,
binary_priority_queue_random_int_push_timing_test_local.png,
binary_priority_queue_random_int_push_timing_test_msvc.png,
binomial_heap_tag.html,
ccgp_hash_random_int_subscript_timing_test_insert_gcc.png,
ccgp_hash_random_int_subscript_timing_test_insert_local.png,
ccgp_hash_random_int_subscript_timing_test_insert_msvc.png,
cc_hash_max_collision_check_resize_trigger.html,
cc_hash_random_int_find_timing_test_gcc.png,
cc_hash_random_int_find_timing_test_local.png,
cc_hash_random_int_find_timing_test_msvc.png,
cc_hash_random_int_subscript_timing_test_find_gcc.png,
cc_hash_random_int_subscript_timing_test_find_local.png,
cc_hash_random_int_subscript_timing_test_find_msvc.png,
cc_hash_random_int_subscript_timing_test_insert_gcc.png,
cc_hash_random_int_subscript_timing_test_insert_local.png,
cc_hash_random_int_subscript_timing_test_insert_msvc.png,
cc_hash_table.html, cc_hash_tag.html, checked_by_tidy.gif
concepts.html, contact.html, container_base.html,
container_cd.png, container_cd.svg, container_tag.html,
counter_lu_policy.html, design.html,
different_underlying_dss.png, direct_mask_range_hashing.html,
direct_mod_range_hashing.html, disclaimer.html, ds_gen.html,
embedded_lists_1.png, embedded_lists_2.png,
embedded_lists_3.png, examples.html, exceptions.html,
gp_hash_random_int_find_timing_test_gcc.png,
gp_hash_random_int_find_timing_test_local.png,
gp_hash_random_int_find_timing_test_msvc.png,
gp_hash_random_int_subscript_timing_test_find_gcc.png,
gp_hash_random_int_subscript_timing_test_find_local.png,
gp_hash_random_int_subscript_timing_test_find_msvc.png,
gp_hash_random_int_subscript_timing_test_insert_gcc.png,
gp_hash_random_int_subscript_timing_test_insert_local.png,
gp_hash_random_int_subscript_timing_test_insert_msvc.png,
gp_hash_table.html, gp_hash_tag.html,
hash_based_containers.html, hash_exponential_size_policy.html,
hash_load_check_resize_trigger.html, hash_policy_cd.png,
hash_prime_size_policy.html,
hash_random_int_erase_mem_usage_test_gcc.png,
hash_random_int_erase_mem_usage_test.html,
hash_random_int_erase_mem_usage_test_local.png,
hash_random_int_erase_mem_usage_test_msvc.png,
hash_random_int_find_find_timing_test.html,
hash_random_int_subscript_find_timing_test.html,
hash_random_int_subscript_insert_timing_test.html,
hash_ranged_hash_range_hashing_fns.png,
hash_range_hashing_seq_diagram2.png,
hash_range_hashing_seq_diagram.png,
hash_standard_resize_policy.html,
hash_text_find_find_timing_test.html,
hash_zlob_random_int_find_find_timing_test.html,
hash_zlob_random_int_find_timing_test_gcc.png,
hash_zlob_random_int_find_timing_test_local.png,
hash_zlob_random_int_find_timing_test_msvc.png, index.html,
insert_error.html, insert_resize_sequence_diagram1.png,
insert_resize_sequence_diagram2.png,
insert_resize_sequence_diagram3.png, interface.html,
introduction.html, invalidation_guarantee_cd.png,
invalidation_guarantee_erase.png, join_error.html,
linear_probe_fn.html, list_update.html, list_update_tag.html,
lu_based_containers.html, lu.png, misc.html, motivation.html,
move_to_front_lu_policy.html,
multimap_text_find_timing_test_large.html,
multimap_text_find_timing_test_large_s2p_hash_gcc.png,
multimap_text_find_timing_test_large_s2p_hash_local.png,
multimap_text_find_timing_test_large_s2p_hash_msvc.png,
multimap_text_find_timing_test_large_s2p_tree_gcc.png,
multimap_text_find_timing_test_large_s2p_tree_local.png,
multimap_text_find_timing_test_large_s2p_tree_msvc.png,
multimap_text_find_timing_test_small.html,
multimap_text_find_timing_test_small_s2p_hash_gcc.png,
multimap_text_find_timing_test_small_s2p_hash_local.png,
multimap_text_find_timing_test_small_s2p_hash_msvc.png,
multimap_text_find_timing_test_small_s2p_tree_gcc.png,
multimap_text_find_timing_test_small_s2p_tree_local.png,
multimap_text_find_timing_test_small_s2p_tree_msvc.png,
multimap_text_insert_mem_usage_test_large.html,
multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png,
multimap_text_insert_mem_usage_test_large_s2p_hash_local.png,
multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png,
multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png,
multimap_text_insert_mem_usage_test_large_s2p_tree_local.png,
multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png,
multimap_text_insert_mem_usage_test_small.html,
multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png,
multimap_text_insert_mem_usage_test_small_s2p_hash_local.png,
multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png,
multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png,
multimap_text_insert_mem_usage_test_small_s2p_tree_local.png,
multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png,
multimap_text_insert_timing_test_large.html,
multimap_text_insert_timing_test_large_s2p_hash_gcc.png,
multimap_text_insert_timing_test_large_s2p_hash_local.png,
multimap_text_insert_timing_test_large_s2p_hash_msvc.png,
multimap_text_insert_timing_test_large_s2p_tree_gcc.png,
multimap_text_insert_timing_test_large_s2p_tree_local.png,
multimap_text_insert_timing_test_large_s2p_tree_msvc.png,
multimap_text_insert_timing_test_small.html,
multimap_text_insert_timing_test_small_s2p_hash_gcc.png,
multimap_text_insert_timing_test_small_s2p_hash_local.png,
multimap_text_insert_timing_test_small_s2p_hash_msvc.png,
multimap_text_insert_timing_test_small_s2p_tree_gcc.png,
multimap_text_insert_timing_test_small_s2p_tree_local.png,
multimap_text_insert_timing_test_small_s2p_tree_msvc.png,
node_invariant_invalidations.png, node_invariants.png,
null_hash_fn.html, null_lu_metadata.html,
null_mapped_type.html, null_probe_fn.html,
null_tree_node_update.html, null_trie_node_update.html,
ov_tree_tag.html, pairing_heap_tag.html,
pairing_priority_queue_text_push_pop_timing_test_gcc.png,
pairing_priority_queue_text_push_pop_timing_test_local.png,
pairing_priority_queue_text_push_pop_timing_test_msvc.png,
pairing_priority_queue_text_push_timing_test_gcc.png,
pairing_priority_queue_text_push_timing_test_local.png,
pairing_priority_queue_text_push_timing_test_msvc.png,
pat_trie.png, pat_trie_tag.html,
point_invalidation_guarantee.html, point_iterators_cd.png,
point_iterators_range_ops_1.png,
point_iterators_range_ops_2.png, pq_container_traits.html,
pq_design.html, pq_different_underlying_dss.png,
pq_examples.html, pq_performance_tests.html,
pq_regression_tests.html, pq_tests.html, prerequisites.html,
priority_queue.html,
priority_queue_random_int_push_pop_timing_test_gcc.png,
priority_queue_random_int_push_pop_timing_test.html,
priority_queue_random_int_push_pop_timing_test_local.png,
priority_queue_random_int_push_pop_timing_test_msvc.png,
priority_queue_random_int_push_timing_test_gcc.png,
priority_queue_random_int_push_timing_test.html,
priority_queue_random_int_push_timing_test_local.png,
priority_queue_random_int_push_timing_test_msvc.png,
priority_queue_tag_cd.png, priority_queue_tag_cd.svg,
priority_queue_tag.html,
priority_queue_text_join_timing_test_gcc.png,
priority_queue_text_join_timing_test.html,
priority_queue_text_join_timing_test_local.png,
priority_queue_text_join_timing_test_msvc.png,
priority_queue_text_modify_down_timing_test_gcc.png,
priority_queue_text_modify_down_timing_test.html,
priority_queue_text_modify_down_timing_test_local.png,
priority_queue_text_modify_down_timing_test_msvc.png,
priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png,
priority_queue_text_modify_down_timing_test_pairing_thin_local.png,
priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png,
priority_queue_text_modify_up_timing_test_gcc.png,
priority_queue_text_modify_up_timing_test.html,
priority_queue_text_modify_up_timing_test_local.png,
priority_queue_text_modify_up_timing_test_msvc.png,
priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png,
priority_queue_text_modify_up_timing_test_pairing_thin_local.png,
priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png,
priority_queue_text_pop_mem_usage_test_gcc.png,
priority_queue_text_pop_mem_usage_test.html,
priority_queue_text_pop_mem_usage_test_local.png,
priority_queue_text_pop_mem_usage_test_msvc.png,
priority_queue_text_push_pop_timing_test_gcc.png,
priority_queue_text_push_pop_timing_test.html,
priority_queue_text_push_pop_timing_test_local.png,
priority_queue_text_push_pop_timing_test_msvc.png,
priority_queue_text_push_timing_test_gcc.png,
priority_queue_text_push_timing_test.html,
priority_queue_text_push_timing_test_local.png,
priority_queue_text_push_timing_test_msvc.png,
PythonPoweredSmall.gif quadratic_probe_fn.html,
random_int_find_find_timing_test_tree_gcc.png,
random_int_find_find_timing_test_tree_local.png,
random_int_find_find_timing_test_tree_msvc.png,
range_invalidation_guarantee.html,
rationale_null_node_updator.png, rb_tree_tag.html,
rc_binomial_heap_tag.html, references.html, resize_error.html,
resize_policy_cd.png, restoring_node_invariants.png,
sample_probe_fn.html, sample_ranged_hash_fn.html,
sample_ranged_probe_fn.html, sample_range_hashing.html,
sample_resize_policy.html, sample_resize_trigger.html,
sample_size_policy.html, sample_tree_node_update.html,
sample_trie_access_traits.html, sample_trie_node_update.html,
sample_update_policy.html, simple_list.png,
splay_tree_tag.html, tests.html,
text_find_timing_test_hash_gcc.png,
text_find_timing_test_hash_local.png,
text_find_timing_test_hash_msvc.png,
text_find_timing_test_tree_like_gcc.png,
text_find_timing_test_tree_like_local.png,
text_find_timing_test_tree_like_msvc.png, thin_heap_tag.html,
tree_based_containers.html, tree.html,
tree_node_iterator.html, tree_node_updator_policy_cd.png,
tree_order_statistics_node_update.html,
tree_order_statistics_timing_test_gcc.png,
tree_order_statistics_timing_test.html,
tree_order_statistics_timing_test_local.png,
tree_order_statistics_timing_test_msvc.png,
tree_random_int_find_find_timing_test.html,
tree_split_join_timing_test_gcc.png,
tree_split_join_timing_test.html,
tree_split_join_timing_test_local.png,
tree_split_join_timing_test_msvc.png, tree_tag.html,
tree_text_find_find_timing_test.html,
tree_text_insert_timing_test.html,
tree_text_insert_timing_test_node_tree_gcc.png,
tree_text_insert_timing_test_node_tree_local.png,
tree_text_insert_timing_test_node_tree_msvc.png,
tree_text_insert_timing_test_pat_trie_gcc.png,
tree_text_insert_timing_test_pat_trie_local.png,
tree_text_insert_timing_test_pat_trie_msvc.png,
tree_text_insert_timing_test_vector_tree_gcc.png,
tree_text_insert_timing_test_vector_tree_local.png,
tree_text_insert_timing_test_vector_tree_msvc.png,
tree_text_lor_find_find_timing_test.html,
tree_text_lor_find_timing_test_gcc.png,
tree_text_lor_find_timing_test_local.png,
tree_text_lor_find_timing_test_msvc.png,
trie_based_containers.html, trie_const_node_iterator.html,
trie.html, trie_node_iterator.html,
trie_node_updator_policy_cd.png,
trie_order_statistics_node_update.html,
trie_prefix_search_node_update.html,
trie_string_access_traits.html, trie_tag.html,
trivial_iterator_tag.html, tutorial.html,
update_policy_cd.png, update_seq_diagram.png): Remove.
2011-07-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49813

View File

@ -144,7 +144,6 @@ stamp-html-copy: stamp-html-docbook
cp -r ${top_srcdir}/doc/html/ext ${docbook_outdir}/html/manual/ext
cd ${docbook_outdir}/html/manual/ext
rm -rf ${docbook_outdir}/html/manual/ext/.svn
rm -rf ${docbook_outdir}/html/manual/ext/pb_ds/.svn
$(STAMP) stamp-html-copy
doc-html: stamp-html
@ -339,6 +338,7 @@ xml_sources_manual = \
${xml_dir}/manual/mt_allocator.xml \
${xml_dir}/manual/numerics.xml \
${xml_dir}/manual/parallel_mode.xml \
${xml_dir}/manual/policy_data_structures.xml \
${xml_dir}/manual/prerequisites.xml \
${xml_dir}/manual/profile_mode.xml \
${xml_dir}/manual/shared_ptr.xml \
@ -350,6 +350,7 @@ xml_sources_manual = \
${xml_dir}/manual/strings.xml \
${xml_dir}/manual/support.xml \
${xml_dir}/manual/test.xml \
${xml_dir}/manual/test_policy_data_structures.xml \
${xml_dir}/manual/using.xml \
${xml_dir}/manual/using_exceptions.xml \
${xml_dir}/manual/utilities.xml \
@ -375,7 +376,8 @@ xml_noinst = \
${xml_dir}/images/confdeps.pdf
XSLTPROC = xsltproc
XSLTPROC_FLAGS = --nonet --xinclude
XSLT_FLAGS = --nonet --xinclude
XSLT_PARAM = --param toc.section.depth 4
#XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
#XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
@ -433,7 +435,7 @@ doc-xml-single-docbook: stamp-xml-single-docbook
# HTML, index plus chapters
stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
$(STAMP) stamp-html-docbook
@ -443,7 +445,7 @@ doc-html-docbook: stamp-html-docbook
manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html
stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html single file..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${manual_html} \
$(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \
$(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
$(STAMP) stamp-html-single-docbook
@ -452,7 +454,7 @@ doc-html-single-docbook: stamp-html-single-docbook
# FO
stamp-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
@echo "Generating FO files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSLTPROC) $(XSLT_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
$(STAMP) stamp-fo-docbook
@ -506,6 +508,7 @@ doc-epub-docbook: stamp-epub-docbook
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
# XXX this needs to be re-worked to create only the SVG charts
doc_performance_script=${top_srcdir}/scripts/make_graphs.py
doc-html-performance:
-@(chmod + ${doc_performance_script}; \

View File

@ -385,6 +385,7 @@ xml_sources_manual = \
${xml_dir}/manual/mt_allocator.xml \
${xml_dir}/manual/numerics.xml \
${xml_dir}/manual/parallel_mode.xml \
${xml_dir}/manual/policy_data_structures.xml \
${xml_dir}/manual/prerequisites.xml \
${xml_dir}/manual/profile_mode.xml \
${xml_dir}/manual/shared_ptr.xml \
@ -396,6 +397,7 @@ xml_sources_manual = \
${xml_dir}/manual/strings.xml \
${xml_dir}/manual/support.xml \
${xml_dir}/manual/test.xml \
${xml_dir}/manual/test_policy_data_structures.xml \
${xml_dir}/manual/using.xml \
${xml_dir}/manual/using_exceptions.xml \
${xml_dir}/manual/utilities.xml \
@ -420,7 +422,8 @@ xml_noinst = \
${xml_dir}/images/confdeps.png \
${xml_dir}/images/confdeps.pdf
XSLTPROC_FLAGS = --nonet --xinclude
XSLT_FLAGS = --nonet --xinclude
XSLT_PARAM = --param toc.section.depth 4
#XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
#XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
@ -463,6 +466,7 @@ manual_epub = ${docbook_outdir}/epub/libstdc++-manual.epub
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
# XXX this needs to be re-worked to create only the SVG charts
doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
# By adding these files here, automake will remove them for 'make clean'
@ -657,7 +661,6 @@ stamp-html-copy: stamp-html-docbook
cp -r ${top_srcdir}/doc/html/ext ${docbook_outdir}/html/manual/ext
cd ${docbook_outdir}/html/manual/ext
rm -rf ${docbook_outdir}/html/manual/ext/.svn
rm -rf ${docbook_outdir}/html/manual/ext/pb_ds/.svn
$(STAMP) stamp-html-copy
doc-html: stamp-html
@ -818,14 +821,14 @@ doc-xml-single-docbook: stamp-xml-single-docbook
# HTML, index plus chapters
stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
$(STAMP) stamp-html-docbook
doc-html-docbook: stamp-html-docbook
stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html single file..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${manual_html} \
$(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \
$(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
$(STAMP) stamp-html-single-docbook
@ -834,7 +837,7 @@ doc-html-single-docbook: stamp-html-single-docbook
# FO
stamp-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
@echo "Generating FO files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSLTPROC) $(XSLT_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
$(STAMP) stamp-fo-docbook

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

View File

@ -1,65 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Acknowledgments</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Acknowledgments</h1>
<ol>
<li>This library was partially written at <a href=
"http://www.haifa.il.ibm.com/">IBM's Haifa Research
Labs</a>.</li>
<li>The library is based heavily on policy-based design and
uses many useful techniques from [<a href=
"references.html#alexandrescu01modern">alexandrescu01modern</a>].</li>
<li>Two ideas are borrowed from the SGI-STL implementation
[<a href="references.html#sgi_stl">sgi_stl</a>]:
<ol>
<li>The prime-based resize policies use a list of primes
taken from the SGI-STL implementation.</li>
<li>The red-black trees contain both a root node and a
header node (containing metadata), connected in a way
that forward and reverse iteration can be performed
efficiently.</li>
</ol>
</li>
<li>Some test utilities borrow ideas from [<a href=
"references.html#boost_timer">boost_timer</a>].</li>
<li>We would like to thank Scott Meyers for useful comments
(without attributing to him any flaws in the design or
implementation of the library).</li>
<li>Much of the documentation is <a href=
"http://www.python.org/"><img src="PythonPoweredSmall.gif"
align="middle" width="55" height="22" alt="[Python Powered]"
border="0" /></a> (especially through <a href=
"http://home.gna.org/pychart/">PyChart</a>, <a href=
"http://www.crummy.com/software/BeautifulSoup/">Beautiful
Soup</a>, and <a href=
"http://starship.python.net/crew/aaron_watters/kjbuckets/">kjbuckets</a>)
and uses <a href="http://tidy.sourceforge.net/"><img src=
"checked_by_tidy.gif" align="middle" width="55" height="45"
alt="[HTML tidy]" border="0" /></a>. The CSS-driven menus are
slightly modified from <a href=
"http://www.brothercake.com/scripts/navmeister/page.php">Brothercake</a>
(hopefully without introducing errors).</li>
</ol>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,491 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="11in"
height="8.5in"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.43"
version="1.0"
sodipodi:docbase="/mnt/share/src/policy_based_data_structures/pb_ds_images"
sodipodi:docname="assoc_tag_diagram_2.svg"
inkscape:export-filename="/mnt/share/src/policy_based_data_structures/pb_ds_images/assoc_tag_diagram_2.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Mstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mstart"
style="overflow:visible">
<path
id="path3311"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.4)" />
</marker>
<marker
inkscape:stockid="Arrow2Sstart"
orient="auto"
refY="0"
refX="0"
id="Arrow2Sstart"
style="overflow:visible">
<path
id="path3319"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(0.3,0,0,0.3,-1.5,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Sstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Sstart"
style="overflow:visible">
<path
id="path3337"
d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="scale(0.2,0.2)" />
</marker>
<marker
inkscape:stockid="Arrow2Send"
orient="auto"
refY="0"
refX="0"
id="Arrow2Send"
style="overflow:visible">
<path
id="path3316"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-0.3,0,0,-0.3,1.5,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Mend"
orient="auto"
refY="0"
refX="0"
id="Arrow2Mend"
style="overflow:visible">
<path
id="path3322"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-0.6,0,0,-0.6,3,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible">
<path
id="path3346"
d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="scale(-0.8,-0.8)" />
</marker>
<marker
inkscape:stockid="Arrow2Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lstart"
style="overflow:visible">
<path
id="path3331"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(1.1,0,0,1.1,-5.5,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lend"
style="overflow:visible">
<path
id="path3328"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-1.1,0,0,-1.1,5.5,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="613.85775"
inkscape:cy="310.05621"
inkscape:document-units="in"
inkscape:current-layer="layer1"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="973"
inkscape:window-x="0"
inkscape:window-y="0"
gridtolerance="0.125in"
guidetolerance="0.125in">
<sodipodi:guide
orientation="horizontal"
position="629"
id="guide1307" />
<sodipodi:guide
orientation="horizontal"
position="449"
id="guide1309" />
<sodipodi:guide
orientation="horizontal"
position="269"
id="guide1311" />
<sodipodi:guide
orientation="vertical"
position="496"
id="guide1313" />
<sodipodi:guide
orientation="vertical"
position="361"
id="guide1315" />
<sodipodi:guide
orientation="vertical"
position="226"
id="guide1317" />
<sodipodi:guide
orientation="vertical"
position="631"
id="guide1319" />
<sodipodi:guide
orientation="vertical"
position="766"
id="guide1321" />
<sodipodi:guide
orientation="vertical"
position="91"
id="guide1345" />
<sodipodi:guide
orientation="vertical"
position="901"
id="guide1347" />
<sodipodi:guide
orientation="horizontal"
position="539"
id="guide3390" />
<sodipodi:guide
orientation="horizontal"
position="359"
id="guide3392" />
<sodipodi:guide
orientation="vertical"
position="280.5"
id="guide3324" />
<sodipodi:guide
orientation="vertical"
position="172"
id="guide3326" />
<sodipodi:guide
orientation="vertical"
position="427"
id="guide3328" />
<sodipodi:guide
orientation="vertical"
position="711.5"
id="guide3340" />
<sodipodi:guide
orientation="horizontal"
position="179"
id="guide1395" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Benjamin Kosnik</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
y="562.32806"
x="237.8916"
height="23.200001"
width="80.769417"
id="rect1495"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.94391561;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.94391561;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1497"
width="80.769417"
height="23.200001"
x="132.8916"
y="562.32806" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.94391561;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1493"
width="80.769417"
height="23.200001"
x="21.891602"
y="562.32806" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1425"
width="141.64481"
height="23.200001"
x="209.57762"
y="382.56177" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3378"
width="141.64481"
height="23.200001"
x="640.77765"
y="382.56177" />
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;stroke-miterlimit:4;stroke-dasharray:none"
x="710.40002"
y="397.09772"
id="use1337"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1391"
x="710.40003"
y="397.09772">basic_hash_table_tag</tspan></text>
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="280"
y="397.09772"
id="text1339"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1385"
x="280"
y="397.09772">basic_tree_tag</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3418"
width="141.64481"
height="23.200001"
x="101.57762"
y="472.5618" />
<rect
y="472.5618"
x="317.57761"
height="23.200001"
width="141.64481"
id="rect3420"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="171.20001"
y="486.29773"
id="text3394"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1387"
x="171.20001"
y="486.29773">tree_tag</tspan></text>
<text
sodipodi:linespacing="100%"
id="text3400"
y="486.29773"
x="388.39999"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1389"
x="388.39999"
y="486.29773">trie_tag</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3380"
width="141.64481"
height="23.200001"
x="425.57764"
y="292.56177" />
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.5625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="495.20001"
y="307.09772"
id="text1323"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1384"
x="495.20001"
y="307.09772">associative_container_tag</tspan></text>
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 170.97058,472.5 L 170.97058,451 L 387.51871,450 L 387.51871,472.5"
id="path2244" />
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 280.5,450.53297 L 280.5,410.62445"
id="path3332" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3422"
width="141.64481"
height="23.200001"
x="533.57764"
y="472.5618" />
<rect
y="472.5618"
x="748.77765"
height="23.200001"
width="141.64481"
id="rect3424"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
sodipodi:linespacing="100%"
id="text3406"
y="486.29773"
x="601.20001"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1393"
x="601.20001"
y="486.29773">cc_hash_table_tag</tspan></text>
<text
xml:space="preserve"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="818"
y="486.29773"
id="text3412"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1395"
x="818"
y="486.29773">gp_hash_table_tag</tspan></text>
<path
id="path3353"
d="M 601.47058,472.5 L 601.47058,451 L 818.01871,450 L 818.01871,472.5"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
<path
id="path3355"
d="M 711,450.53297 L 711,410.62445"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path3344"
d="M 281.18218,383.28102 L 281.18218,361.78102 L 711.79281,360.78102 L 711.79281,383.28102"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
y="383.1962"
x="425.625"
height="23.200001"
width="141.64481"
id="rect3376"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
sodipodi:linespacing="100%"
id="use1329"
y="397.73215"
x="497.24741"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1382"
x="497.24741"
y="397.73215">list_update_tag</tspan></text>
<path
id="path3347"
d="M 497.79886,384.13056 L 497.79886,323.40547"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="61.152512"
y="577.07874"
id="text1423"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1418"
x="61.152512"
y="577.07874">rb_tree_tag</tspan></text>
<text
sodipodi:linespacing="100%"
id="text1427"
y="577.07874"
x="277.95251"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1414"
x="277.95252"
y="577.07874">splay_tree_tag</tspan></text>
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 61.42308,563.28102 L 61.42308,541.78102 L 277.97121,540.78102 L 277.97121,563.28102"
id="path1431" />
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 170.9525,561.5357 L 170.9525,503.81235"
id="path1433" />
<rect
y="562.17499"
x="347.8916"
height="23.200001"
width="80.769417"
id="rect1469"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.94391561;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
sodipodi:linespacing="100%"
id="text1471"
y="576.71094"
x="388.80002"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1412"
x="388.80002"
y="576.71094">pat_trie_tag</tspan></text>
<path
id="path1475"
d="M 389.35146,563.10936 L 389.35146,502.38427"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="173.95251"
y="577.07874"
id="text1487"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1416"
x="173.95251"
y="577.07874">ov_tree_tag</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,170 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>container_traits Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>container_traits</tt> Interface</h1>
<p>Traits of an associative-container based on its underlying
data structure.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Cntnr59189" id="Cntnr59189"><b>class</b> Cntnr</a>
</pre>
</td>
<td>
<p>Container type.</p>
</td>
<td>-</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">Container Attributes</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="invalidation_guarantee3793555937" id=
"invalidation_guarantee3793555937">invalidation_guarantee</a>
</pre>
</td>
<td>
<pre>
Invalidation guarantee.
</pre>
</td>
<td>
<p>Invalidation-guarantee type.</p>
<p>This is either <a href=
"basic_invalidation_guarantee.html"><span class=
"c2"><tt>basic_invalidation_guarantee</tt></span></a>,
<a href="point_invalidation_guarantee.html"><span class=
"c2"><tt>point_invalidation_guarantee</tt></span></a>, or
<a href="range_invalidation_guarantee.html"><span class=
"c2"><tt>range_invalidation_guarantee</tt></span></a></p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="order_preserving1910229172" id=
"order_preserving1910229172">order_preserving</a>
</pre>
</td>
<td>
<pre>
True only if Cntnr objects guarantee storing keys by order.
</pre>
</td>
<td>
<p>Order-preserving indicator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="erase_can_throw153323856" id=
"erase_can_throw153323856">erase_can_throw</a>
</pre>
</td>
<td>
<pre>
True only if erasing a key can throw.
</pre>
</td>
<td>
<p>Erase-throw indicator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="reverse_iteration894617078" id=
"reverse_iteration894617078">reverse_iteration</a>
</pre>
</td>
<td>
<pre>
True only reverse iterators are supported.
</pre>
</td>
<td>
<p>Reverse iteration indicator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="split_join_can_throw3200477759" id=
"split_join_can_throw3200477759">split_join_can_throw</a>
</pre>
</td>
<td>
<pre>
True only if split or join operations can throw.
</pre>
</td>
<td>
<p>Split-join throw indicator.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,46 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Associative Containers</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Associative-Container Design</h1>
<ol>
<li><a href="ds_gen.html">Data-Structure Genericity</a></li>
<li class="c1">Genericity discusses generic manipulation of
containers based on different underlying
data structures.</li>
<li class="c1">Genericity discusses generic manipulation of
containers with different mapping semantics.</li>
<li><a href="tree_based_containers.html">Tree-Based
Containers</a> describes the design and policies of
tree-based containers.</li>
<li><a href="trie_based_containers.html">Trie-Based
Containers</a> describes the design and policies of
trie-based containers.</li>
<li><a href="hash_based_containers.html">Hash-Based
Containers</a> describes the design and policies of
hash-based containers.</li>
<li><a href="lu_based_containers.html">List-Based
Containers</a> describes the design and policies of
list-based containers with update policies.</li>
</ol>
</div>
</body>
</html>

View File

@ -1,151 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Examples</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Associative-Container Examples</h1>
<h2><a name="basic_usage" id="basic_usage">Basic Use</a></h2>
<ol>
<li>
<a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/basic_map.cc"><tt>basic_map.cc</tt></a>
Basic use of "maps".</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/basic_set.cc"><tt>basic_set.cc</tt></a>
Basic use of "sets".</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/erase_if.cc"><tt>erase_if.cc</tt></a>
Conditionally erasing values from a container object.</li>
</ol>
<h2><a name="generics" id="generics">Generics</a></h2>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/assoc_container_traits.cc"><tt>assoc_container_traits.cc</tt></a>
Using <a href=
"assoc_container_traits.html"><tt>container_traits</tt></a> to query
about underlying data structure behavior.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_find_neg.cc"><tt>hash_find_neg.cc</tt></a>
A non-compiling example showing wrong use of finding keys in
hash-based containers.</li>
</ol>
<h2><a name="hash_based" id="hash_based">Hash-Based
Containers</a></h2>
<h3><a name="resize_related" id="resize_related">Resize
Related</a></h3>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_initial_size.cc"><tt>hash_initial_size.cc</tt></a>
Setting the initial size of a hash-based container
object.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc"><tt>hash_resize_neg.cc</tt></a>
A non-compiling example showing how not to resize a
hash-based container object.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_resize.cc"><tt>hash_resize.cc</tt></a>
Resizing the size of a hash-based container object.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc"><tt>hash_illegal_resize.cc</tt></a>
Showing an illegal resize of a hash-based container
object.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_load_set_change.cc"><tt>hash_load_set_change.cc</tt></a>
Changing the load factors of a hash-based container
object.</li>
</ol>
<h3><a name="hash_related" id="hash_related">Hash-Function
Related</a></h3>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_mod.cc"><tt>hash_mod.cc</tt></a>
Using a modulo range-hashing function for the case of an
unknown skewed key distribution.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc"><tt>shift_mask.cc</tt></a>
Writing a range-hashing functor for the case of a known
skewed key distribution.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/store_hash.cc"><tt>store_hash.cc</tt></a>
Storing the hash value along with each key.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/ranged_hash.cc"><tt>ranged_hash.cc</tt></a>
Writing a ranged-hash functor.</li>
</ol>
<h2><a name="tree_like_based" id= "tree_like_based">Tree-Like Containers (Trees and
Tries)</a></h2>
<h3><a name="node_invariants" id=
"node_invariants">Node-Invariants</a></h3>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/tree_order_statistics.cc"><tt>tree_order_statistics.cc</tt></a>
Using trees for order statistics.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/tree_intervals.cc"><tt>tree_intervals.cc</tt></a>
Augmenting trees to support operations on line
intervals.</li>
</ol>
<h3><a name="split_join" id="split_join">Split and
Join</a></h3>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/tree_join.cc"><tt>tree_join.cc</tt></a>
Joining two tree-based container objects.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/trie_split.cc"><tt>trie_split.cc</tt></a>
Splitting a PATRICIA trie container object.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/tree_order_statistics_join.cc"><tt>tree_order_statistics_join.cc</tt></a>
Order statistics while joining two tree-based container
objects.</li>
</ol>
<h2><a name="trie_based" id="trie_based">Trie-Based
Containers</a></h2>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/trie_dna.cc"><tt>trie_dna.cc</tt></a>
Using a PATRICIA trie for DNA strings.</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/trie_prefix_search.cc"><tt>trie_prefix_search.cc</tt></a>
Using a PATRICIA trie for finding all entries whose key
matches a given prefix.</li>
</ol>
<h2><a name="mmaps" id="mmaps">"Multimaps" and
"Multisets".</a></h2>
<ol>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/basic_multimap.cc"><tt>basic_multimap.cc</tt></a>
Basic use of "multimaps".</li>
<li><a href= "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/basic_multiset.cc"><tt>basic_multiset.cc</tt></a>
Basic use of "multisets".</li>
</ol>
</div>
</body>
</html>

View File

@ -1,345 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Associative-Container Performance Tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><a name="assoc" id="assoc">Associative-Container
Performance Tests</a></h1>
<h2><a name="settings" id="settings">Settings</a></h2>
<p>This section describes performance tests and their results.
In the following, <a href="#gcc"><u>g++</u></a>, <a href="#msvc"><u>msvc++</u></a>, and <a href="#local"><u>local</u></a> (the build used for generating this
documentation) stand for three different builds:</p>
<div id="gcc_settings_div">
<div class="c1">
<h3><a name="gcc" id="gcc"><u>g++</u></a></h3>
<ul>
<li>CPU speed - cpu MHz : 2660.644</li>
<li>Memory - MemTotal: 484412 kB</li>
<li>Platform -
Linux-2.6.12-9-386-i686-with-debian-testing-unstable</li>
<li>Compiler - g++ (GCC) 4.0.2 20050808 (prerelease)
(Ubuntu 4.0.1-4ubuntu9) Copyright (C) 2005 Free Software
Foundation, Inc. This is free software; see the source
for copying conditions. There is NO warranty; not even
for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.</li>
</ul>
</div>
<div class="c2"></div>
</div>
<div id="msvc_settings_div">
<div class="c1">
<h3><a name="msvc" id="msvc"><u>msvc++</u></a></h3>
<ul>
<li>CPU speed - cpu MHz : 2660.554</li>
<li>Memory - MemTotal: 484412 kB</li>
<li>Platform - Windows XP Pro</li>
<li>Compiler - Microsoft (R) 32-bit C/C++ Optimizing
Compiler Version 13.10.3077 for 80x86 Copyright (C)
Microsoft Corporation 1984-2002. All rights
reserved.</li>
</ul>
</div>
<div class="c2"></div>
</div>
<div id="local_settings_div"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h3><a name = "local"><u>local</u></a></h3><ul>
<li>CPU speed - cpu MHz : 2250.000</li>
<li>Memory - MemTotal: 2076248 kB</li>
<li>Platform - Linux-2.6.16-1.2133_FC5-i686-with-redhat-5-Bordeaux</li>
<li>Compiler - g++ (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</li>
</ul>
</div><div style = "width: 100%; height: 20px"></div></div>
<h2><a name="assoc_tests" id="assoc_tests">Tests</a></h2>
<h3><a name="hash_based" id="hash_based">Hash-Based
Containers</a></h3>
<ol>
<li><a href="hash_text_find_find_timing_test.html">Hash-Based
Text <tt>find</tt> Find Timing Test</a></li>
<li><a href="hash_random_int_find_find_timing_test.html">Hash-Based
Random-Integer <tt>find</tt> Find Timing Test</a></li>
<li><a href="hash_random_int_subscript_find_timing_test.html">Hash-Based
Random-Integer Subscript Find Timing Test</a></li>
<li><a href="hash_random_int_subscript_insert_timing_test.html">Hash-Based
Random-Integer Subscript Insert Timing Test</a></li>
<li><a href="hash_zlob_random_int_find_find_timing_test.html">Hash-Based
Skewed-Distribution Random-Integer <tt>find</tt> Find Timing
Test</a></li>
<li><a href="hash_random_int_erase_mem_usage_test.html">Hash-Based Erase
Memory Use Test</a></li>
</ol>
<h3><a name="tree_like_based" id="tree_like_based">Tree-Like-Based Containers</a></h3>
<ol>
<li><a href="tree_text_insert_timing_test.html">Tree-Based
and Trie-Based Text Insert Timing Test</a></li>
<li><a href="tree_text_find_find_timing_test.html">Tree-Based
and Trie-Based Text <tt>find</tt> Find Timing Test</a></li>
<li><a href="tree_text_lor_find_find_timing_test.html">Tree-Based
Locality-of-Reference Text <tt>find</tt> Find Timing
Test</a></li>
<li><a href="tree_random_int_find_find_timing_test.html">Tree-Based
Random-Integer <tt>find</tt> Find Timing Test</a></li>
<li><a href="tree_split_join_timing_test.html">Tree Split and
Join Timing Test</a></li>
<li><a href="tree_order_statistics_timing_test.html">Tree
Order-Statistics Timing Test</a></li>
</ol>
<h3><a name="multimaps" id="multimaps">Multimaps</a></h3>
<ol>
<li><a href="multimap_text_find_timing_test_small.html">"Multimap"
Text Find Timing Test with <u>Small</u> Average Secondary-Key
to Primary-Key Ratio</a></li>
<li><a href="multimap_text_find_timing_test_large.html">"Multimap"
Text Find Timing Test with <u>Large</u> Average Secondary-Key
to Primary-Key Ratio</a></li>
<li><a href="multimap_text_insert_timing_test_small.html">"Multimap"
Text Insert Timing Test with <u>Small</u> Average
Secondary-Key to Primary-Key Ratio</a></li>
<li><a href="multimap_text_insert_timing_test_large.html">"Multimap"
Text Insert Timing Test with <u>Large</u> Average
Secondary-Key to Primary-Key Ratio</a></li>
<li><a href="multimap_text_insert_mem_usage_test_small.html">"Multimap"
Text Insert Memory-Use Test with <u>Small</u> Average
Secondary-Key to Primary-Key Ratio</a></li>
<li><a href="multimap_text_insert_mem_usage_test_large.html">"Multimap"
Text Insert Memory-Use Test with <u>Large</u> Average
Secondary-Key to Primary-Key Ratio</a></li>
</ol>
<h2><a name="assoc_observations" id="assoc_observations">Observations</a></h2>
<h3><a name="dss_family_choice" id="dss_family_choice">Underlying Data-Structure Families</a></h3>
<p>In general, hash-based containers (see <a href="hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a>) have better timing
performance than containers based on different underlying-data
structures. The main reason to choose a tree-based (see
<a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>) or trie-based container
(see <a href="trie_based_containers.html">Design::Associative
Containers::Trie-Based Containers</a>) is if a byproduct of the
tree-like structure is required: either order-preservation, or
the ability to utilize node invariants (see <a href="tree_based_containers.html#invariants">Design::Associative
Containers::Tree-Based Containers::Node Invariants</a> and
<a href="trie_based_containers.html#invariants">Design::Associative
Containers::Trie-Based Containers::Node Invariants</a>). If
memory-use is the major factor, an ordered-vector tree (see
<a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>) gives optimal results
(albeit with high modificiation costs), and a list-based
container (see <a href="lu_based_containers.html">Design::Associative
Containers::List-Based Containers</a>) gives reasonable
results.</p>
<h3><a name="hash_based_types" id="hash_based_types">Hash-Based
Container Types</a></h3>
<p>Hash-based containers are typically either collision
chaining or probing (see <a href="hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a>). Collision-chaining
containers are more flexible internally, and so offer better
timing performance. Probing containers, if used for simple
value-types, manage memory more efficiently (they perform far
fewer allocation-related calls). In general, therefore, a
collision-chaining table should be used. A probing container,
conversely, might be used efficiently for operations such as
eliminating duplicates in a sequence, or counting the number of
occurrences within a sequence. Probing containers might be more
useful also in multithreaded applications where each thread
manipulates a hash-based container: in the STL, allocators have
class-wise semantics (see [<a href="references.html#meyers96more">meyers96more</a>] - Item 10); a
probing container might incur less contention in this case.</p>
<h3><a name="hash_based_policies" id="hash_based_policies">Hash-Based Containers' Policies</a></h3>
<p>In hash-based containers, the range-hashing scheme (see
<a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a>) seems to
affect performance more than other considerations. In most
settings, a mask-based scheme works well (or can be made to
work well). If the key-distribution can be estimated a-priori,
a simple hash function can produce nearly uniform hash-value
distribution. In many other cases (<i>e.g.</i>, text hashing,
floating-point hashing), the hash function is powerful enough
to generate hash values with good uniformity properties
[<a href="references.html#knuth98sorting">knuth98sorting</a>];
a modulo-based scheme, taking into account all bits of the hash
value, appears to overlap the hash function in its effort.</p>
<p>The range-hashing scheme determines many of the other
policies (see <a href="hash_based_containers.html#policy_interaction">Design::Hash-Based
Containers::Policy Interaction</a>). A mask-based scheme works
well with an exponential-size policy (see <a href="hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a>) ; for
probing-based containers, it goes well with a linear-probe
function (see <a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a>).</p>
<p>An orthogonal consideration is the trigger policy (see
<a href="hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a>). This
presents difficult tradeoffs. <i>E.g.</i>, different load
factors in a load-check trigger policy yield a
space/amortized-cost tradeoff.</p>
<h3><a name="tree_like_based_types" id="tree_like_based_types">Tree-Like-Based Container
Types</a></h3>
<p>In general, there are several families of tree-based
underlying data structures: balanced node-based trees
(<i>e.g.</i>, red-black or AVL trees), high-probability
balanced node-based trees (<i>e.g.</i>, random treaps or
skip-lists), competitive node-based trees (<i>e.g.</i>, splay
trees), vector-based "trees", and tries. (Additionally, there
are disk-residing or network-residing trees, such as B-Trees
and their numerous variants. An interface for this would have
to deal with the execution model and ACID guarantees; this is
out of the scope of this library.) Following are some
observations on their application to different settings.</p>
<p>Of the balanced node-based trees, this library includes a
red-black tree (see <a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>), as does STL (in
practice). This type of tree is the "workhorse" of tree-based
containers: it offers both reasonable modification and
reasonable lookup time. Unfortunately, this data structure
stores a huge amount of metadata. Each node must contain,
besides a value, three pointers and a boolean. This type might
be avoided if space is at a premium [<a href="references.html#austern00noset">austern00noset</a>].</p>
<p>High-probability balanced node-based trees suffer the
drawbacks of deterministic balanced trees. Although they are
fascinating data structures, preliminary tests with them showed
their performance was worse than red-black trees. The library
does not contain any such trees, therefore.</p>
<p>Competitive node-based trees have two drawbacks. They are
usually somewhat unbalanced, and they perform a large number of
comparisons. Balanced trees perform one comparison per each
node they encounter on a search path; a splay tree performs two
comparisons. If the keys are complex objects, <i>e.g.</i>,
<tt>std::string</tt>, this can increase the running time.
Conversely, such trees do well when there is much locality of
reference. It is difficult to determine in which case to prefer
such trees over balanced trees. This library includes a splay
tree (see <a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>).</p>
<p>Ordered-vector trees (see <a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>) use very little space
[<a href="references.html#austern00noset">austern00noset</a>].
They do not have any other advantages (at least in this
implementation).</p>
<p>Large-fan-out PATRICIA tries (see <a href="trie_based_containers.html">Design::Associative
Containers::Trie-Based Containers</a>) have excellent lookup
performance, but they do so through maintaining, for each node,
a miniature "hash-table". Their space efficiency is low, and
their modification performance is bad. These tries might be
used for semi-static settings, where order preservation is
important. Alternatively, red-black trees cross-referenced with
hash tables can be used. [<a href="references.html#okasaki98mereable">okasaki98mereable</a>]
discusses small-fan-out PATRICIA tries for integers, but the
cited results seem to indicate that the amortized cost of
maintaining such trees is higher than that of balanced trees.
Moderate-fan-out trees might be useful for sequences where each
element has a limited number of choices, <i>e.g.</i>, DNA
strings (see <a href="assoc_examples.html#trie_based">Examples::Associative
Containers::Trie-Based Containers</a>).</p>
<h3><a name="msc" id="msc">Mapping-Semantics
Considerations</a></h3>
<p>Different mapping semantics were discussed in <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
Containers::Alternative to Multiple Equivalent Keys</a> and
<a href="tutorial.html#assoc_ms">Tutorial::Associative
Containers::Associative Containers Others than Maps</a>. We
will focus here on the case where a keys can be composed into
primary keys and secondary keys. (In the case where some keys
are completely identical, it is trivial that one should use an
associative container mapping values to size types.) In this
case there are (at least) five possibilities:</p>
<ol>
<li>Use an associative container that allows equivalent-key
values (such as <tt>std::multimap</tt>)</li>
<li>Use a unique-key value associative container that maps
each primary key to some complex associative container of
secondary keys, say a tree-based or hash-based container (see
<a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a> and <a href="hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a>)</li>
<li>Use a unique-key value associative container that maps
each primary key to some simple associative container of
secondary keys, say a list-based container (see <a href="lu_based_containers.html">Design::Associative
Containers::List-Based Containers</a>)</li>
<li>Use a unique-key value associative container that maps
each primary key to some non-associative container
(<i>e.g.</i>, <tt>std::vector</tt>)</li>
<li>Use a unique-key value associative container that takes
into account both primary and secondary keys.</li>
</ol>
<p>We do not think there is a simple answer for this (excluding
option 1, which we think should be avoided in all cases).</p>
<p>If the expected ratio of secondary keys to primary keys is
small, then 3 and 4 seem reasonable. Both types of secondary
containers are relatively lightweight (in terms of memory use
and construction time), and so creating an entire container
object for each primary key is not too expensive. Option 4
might be preferable to option 3 if changing the secondary key
of some primary key is frequent - one cannot modify an
associative container's key, and the only possibility,
therefore, is erasing the secondary key and inserting another
one instead; a non-associative container, conversely, can
support in-place modification. The actual cost of erasing a
secondary key and inserting another one depends also on the
allocator used for secondary associative-containers (The tests
above used the standard allocator, but in practice one might
choose to use, <i>e.g.</i>, [<a href="references.html#boost_pool">boost_pool</a>]). Option 2 is
definitely an overkill in this case. Option 1 loses out either
immediately (when there is one secondary key per primary key)
or almost immediately after that. Option 5 has the same
drawbacks as option 2, but it has the additional drawback that
finding all values whose primary key is equivalent to some key,
might be linear in the total number of values stored (for
example, if using a hash-based container).</p>
<p>If the expected ratio of secondary keys to primary keys is
large, then the answer is more complicated. It depends on the
distribution of secondary keys to primary keys, the
distribution of accesses according to primary keys, and the
types of operations most frequent.</p>
<p>To be more precise, assume there are <i>m</i> primary keys,
primary key <i>i</i> is mapped to <i>n<sub>i</sub></i>
secondary keys, and each primary key is mapped, on average, to
<i>n</i> secondary keys (<i>i.e.</i>,
<i><b>E</b>(n<sub>i</sub>) = n</i>).</p>
<p>Suppose one wants to find a specific pair of primary and
secondary keys. Using 1 with a tree based container
(<tt>std::multimap</tt>), the expected cost is
<i><b>E</b>(&Theta;(log(m) + n<sub>i</sub>)) = &Theta;(log(m) +
n)</i>; using 1 with a hash-based container
(<tt>std::tr1::unordered_multimap</tt>), the expected cost is
<i>&Theta;(n)</i>. Using 2 with a primary hash-based container
and secondary hash-based containers, the expected cost is
<i>O(1)</i>; using 2 with a primary tree-based container and
secondary tree-based containers, the expected cost is (using
the Jensen inequality [<a href="references.html#motwani95random">motwani95random</a>])
<i><b>E</b>(O(log(m) + log(n<sub>i</sub>)) = O(log(m)) +
<b>E</b>(O(log(n<sub>i</sub>)) = O(log(m)) + O(log(n))</i>,
assuming that primary keys are accessed equiprobably. 3 and 4
are similar to 1, but with lower constants. Using 5 with a
hash-based container, the expected cost is <i>O(1)</i>; using 5
with a tree based container, the cost is
<i><b>E</b>(&Theta;(log(mn))) = &Theta;(log(m) +
log(n))</i>.</p>
<p>Suppose one needs the values whose primary key matches some
given key. Using 1 with a hash-based container, the expected
cost is <i>&Theta;(n)</i>, but the values will not be ordered
by secondary keys (which may or may not be required); using 1
with a tree-based container, the expected cost is
<i>&Theta;(log(m) + n)</i>, but with high constants; again the
values will not be ordered by secondary keys. 2, 3, and 4 are
similar to 1, but typically with lower constants (and,
additionally, if one uses a tree-based container for secondary
keys, they will be ordered). Using 5 with a hash-based
container, the cost is <i>&Theta;(mn)</i>.</p>
<p>Suppose one wants to assign to a primary key all secondary
keys assigned to a different primary key. Using 1 with a
hash-based container, the expected cost is <i>&Theta;(n)</i>,
but with very high constants; using 1 with a tree-based
container, the cost is <i>&Theta;(nlog(mn))</i>. Using 2, 3,
and 4, the expected cost is <i>&Theta;(n)</i>, but typically
with far lower costs than 1. 5 is similar to 1.</p>
</div>
</body>
</html>

View File

@ -1,93 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Associative-Container Regression Tests</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<base href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/regression/">
</head>
<body>
<div id="page">
<h1>Associative-Container Regression Tests</h1>
<h2><a name="assoc_desc" id="assoc_desc">Description</a></h2>
<p>The library contains a single comprehensive regression test.
For a given container type in <tt>pb_ds</tt>, the test creates
an object of the container type and an object of the
corresponding STL type (<i>e.g.</i>, <tt>std::set</tt>). It
then performs a random sequence of methods with random
arguments (<i>e.g.</i>, inserts, erases, and so forth) on both
objects. At each operation, the test checks the return value of
the method, and optionally both compares <tt>pb_ds</tt>'s
object with the STL's object as well as performing other
consistency checks on <tt>pb_ds</tt>'s object (<i>e.g.</i>,
order preservation, when applicable, or node invariants, when
applicable).</p>
<p>Additionally, the test integrally checks exception safety
and resource leaks. This is done as follows. A special
allocator type, written for the purpose of the test, both
randomly throws an exceptions when allocations are performed,
and tracks allocations and de-allocations. The exceptions thrown
at allocations simulate memory-allocation failures; the
tracking mechanism checks for memory-related bugs (<i>e.g.</i>,
resource leaks and multiple de-allocations). Both
<tt>pb_ds</tt>'s containers and the containers' value-types are
configured to use this allocator.</p>
<p>Due to compiler constraints, the test is split into the
several sources, each checking only some containers.</p>
<h2><a name="assoc_tests" id="assoc_tests">Tests</a></h2>
<h3><a name="assoc_tests_set" id="assoc_tests_set">"Set"
Tests</a></h3>
<p>The following check all "set" types:</p>
<ol>
<li><a href=
"hash_no_data_map_rand.cc"><tt>hash_no_data_map_rand.cc</tt></a>
checks all hash-based "set" types.</li>
<li><a href=
"list_update_no_data_map_rand.cc"><tt>list_update_no_data_map_rand.cc</tt></a>
checks all list-based "set" types.</li>
<li><a href=
"tree_no_data_map_rand.cc"><tt>tree_no_data_map_rand.cc</tt></a>
checks all tree-based "set" types.</li>
<li><a href=
"trie_no_data_map_rand.cc"><tt>trie_no_data_map_rand.cc</tt></a>
checks all PATRICIA-trie-based "set" types.</li>
</ol>
<h3><a name="assoc_tests_map" id="assoc_tests_map">"Map"
Tests</a></h3>
<p>The following check all "map" types:</p>
<ol>
<li><a href= "hash_data_map_rand.cc"><tt>hash_data_map_rand.cc</tt></a>
checks all hash-based "map" types.</li>
<li><a href= "list_update_data_map_rand.cc"><tt>list_update_data_map_rand.cc</tt></a>
checks all list-based "map" types.</li>
<li><a href= "tree_data_map_rand.cc"><tt>tree_data_map_rand.cc</tt></a>
checks all tree-based "map" types.</li>
<li><a href= "trie_data_map_rand.cc"><tt>trie_data_map_rand.cc</tt></a>
checks all PATRICIA-trie-based "map" types.</li>
</ol>
</div>
</body>
</html>

View File

@ -1,24 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Associative-Container Tests</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Associative-Container Tests</h1>
<p><a href="assoc_regression_tests.html">Associative-Container
Regression Tests</a> describes the regression tests; <a href=
"assoc_performance_tests.html">Associative-Container
Performance Tests</a> describes the performance tests.</p>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>associative_container_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>associative_container_tag</tt> Interface</h1>
<p>Basic associative-container data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="container_tag.html"><span class=
"c2"><tt>container_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,436 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>basic_hash_table Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>basic_hash_table</tt> Interface</h1>
<p>An abstract basic hash-based associative container.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Key2501" id="Key2501"><b>typename</b> Key</a>
</pre>
</td>
<td>
<p>Key type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Mapped318655" id="Mapped318655"><b>typename</b> Mapped</a>
</pre>
</td>
<td>
<p>Mapped type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Hash_Fn1515835" id=
"Hash_Fn1515835"><b>class</b> Hash_Fn</a>
</pre>
</td>
<td>
<p>Hash functor.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Eq_Fn60085" id="Eq_Fn60085"><b>class</b> Eq_Fn</a>
</pre>
</td>
<td>
<p>Equivalence functor.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Resize_Policy566860465" id=
"Resize_Policy566860465"><b>class</b> Resize_Policy</a>
</pre>
</td>
<td>
<p>Resize policy.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Store_Hash218262104" id=
"Store_Hash218262104"><b>bool</b> Store_Hash</a>
</pre>
</td>
<td>
<p>Indicates whether the hash value will be stored along
with each key.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Tag278938" id="Tag278938"><b>class</b> Tag</a>
</pre>
</td>
<td>
<p>Mapped-structure tag.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator</a>
</pre>
</td>
<td>
<p>Allocator type.</p>
</td>
<td>-</td>
</tr>
</table>
<h2><a name="link2" id="link2">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="container_base.html"><span class=
"c2"><tt>container_base</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Types and
Constants</a></h2>
<h3><a name="link4" id="link4">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="hash_fn2015995" id="hash_fn2015995">hash_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a>
</pre>
</td>
<td>
<p>Hash functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="eq_fn80245" id="eq_fn80245">eq_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Eq_Fn60085"><tt>Eq_Fn</tt></a>
</pre>
</td>
<td>
<p>Equivalence functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="resize_policy4084493169" id=
"resize_policy4084493169">resize_policy</a>
</pre>
</td>
<td>
<pre>
<a href="#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
</pre>
</td>
<td>
<p>Resize policy type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="store_hash280766104" id=
"store_hash280766104">store_hash</a>
</pre>
</td>
<td>
<pre>
<a href="#Store_Hash218262104"><tt>Store_Hash</tt></a>
</pre>
</td>
<td>
<p>Indicates whether a hash value is stored with each
entry.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Public Methods</a></h2>
<h3><a name="link6" id="link6">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~basic_hash_table
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
</table>
<h3><a name="link7" id="link7">Policy Access Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> &amp;
get_hash_fn
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href="#hash_fn2015995"><tt>hash_fn</tt></a> &amp;
get_hash_fn
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#eq_fn80245"><tt>eq_fn</tt></a> &amp;
get_eq_fn
()
</pre>
</td>
<td>
<p>Access to the <a href="#eq_fn80245"><tt>eq_fn</tt></a>
object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href="#eq_fn80245"><tt>eq_fn</tt></a> &amp;
get_eq_fn
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#resize_policy4084493169"><tt>resize_policy</tt></a> &amp;
get_resize_policy
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a>
object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a> &amp;
get_resize_policy
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a>
object.</p>
</td>
</tr>
</table>
<h2><a name="link8" id="link8">Private Methods</a></h2>
<h3><a name="link9" id="link9">Resize Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b> <b>void</b>
do_resize
(size_type new_size)
</pre>
</td>
<td>
<p>Resizes the container object to <span class=
"c1"><tt>new_size</tt></span>.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>basic_hash_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>basic_hash_tag</tt> Interface</h1>
<p>Basic hash data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="associative_container_tag.html"><span class=
"c2"><tt>associative_container_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,26 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>basic_invalidation_guarantee Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>basic_invalidation_guarantee</tt> Interface</h1>
<p>Signifies a basic invalidation guarantee that any iterator,
pointer, or reference to a container object's mapped value type
is valid as long as the container is not modified.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
</div>
</body>
</html>

View File

@ -1,660 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>basic_tree Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>basic_tree</tt> Interface</h1>
<p>An abstract basic tree-like-based associative container.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Key2501" id="Key2501"><b>typename</b> Key</a>
</pre>
</td>
<td>
<p>Key type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Mapped318655" id="Mapped318655"><b>typename</b> Mapped</a>
</pre>
</td>
<td>
<p>Mapped type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Tag278938" id="Tag278938"><b>class</b> Tag</a>
</pre>
</td>
<td>
<p>Mapped-structure tag.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Node_Update841554648" id=
"Node_Update841554648"><b>class</b> Node_Update</a>
</pre>
</td>
<td>
<p>Node updater.</p>
<p>Restores node-invariants when invalidated.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Policy_Tl42017403" id=
"Policy_Tl42017403"><b>class</b> Policy_Tl</a>
</pre>
</td>
<td>
<p>Policy typelist.</p>
<p>Contains subclasses' policies.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator</a>
</pre>
</td>
<td>
<p>Allocator type.</p>
</td>
<td>-</td>
</tr>
</table>
<h2><a name="link2" id="link2">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#Node_Update841554648"><tt>Node_Update</tt></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="container_base.html"><span class=
"c2"><tt>container_base</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Types and
Constants</a></h2>
<h3><a name="link4" id="link4">Key-Type Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="const_key_reference3185471705" id=
"const_key_reference3185471705">const_key_reference</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> <a href="container_base.html"><span class=
"c2"><tt>container_base</tt></span></a>::const_key_reference
</pre>
</td>
<td>
<p>Const key reference type.</p>
</td>
</tr>
</table>
<h3><a name="link5" id="link5">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="node_update2404554648" id=
"node_update2404554648">node_update</a>
</pre>
</td>
<td>
<pre>
<a href="#Node_Update841554648"><tt>Node_Update</tt></a>
</pre>
</td>
<td>
<p>Node updater type.</p>
</td>
</tr>
</table>
<h3><a name="link6" id="link6">Iterator Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="const_iterator98626788" id=
"const_iterator98626788">const_iterator</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> <a href="container_base.html"><span class=
"c2"><tt>container_base</tt></span></a>::const_iterator
</pre>
</td>
<td>
<p>Const range-type iterator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="iterator10418194" id="iterator10418194">iterator</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> <a href="container_base.html"><span class=
"c2"><tt>container_base</tt></span></a>::iterator
</pre>
</td>
<td>
<p>Range-type iterator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="const_reverse_iterator4151293083" id=
"const_reverse_iterator4151293083">const_reverse_iterator</a>
</pre>
</td>
<td>
<pre>
Const reverse range-type iterator.
</pre>
</td>
<td>
<p>Const reverse range-type <a href=
"#iterator10418194"><tt>iterator</tt></a>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="reverse_iterator1896910345" id=
"reverse_iterator1896910345">reverse_iterator</a>
</pre>
</td>
<td>
<pre>
Reverse range-type iterator.<br />
If <a href="#Mapped318655"><tt>Mapped</tt></a> is <a href=
"null_mapped_type.html"><span class=
"c2"><tt>null_mapped_type</tt></span></a>, then this is synonymous to <a href="#const_reverse_iterator4151293083"><tt>const_reverse_iterator</tt></a>
</pre>
</td>
<td>
<p>Reverse range-type <a href=
"#iterator10418194"><tt>iterator</tt></a>.</p>
</td>
</tr>
</table>
<h2><a name="link7" id="link7">Public Methods</a></h2>
<h3><a name="link8" id="link8">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~basic_tree
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
</table>
<h3><a name="link9" id="link9">Policy Access Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#node_update2404554648"><tt>node_update</tt></a> &amp;
get_node_update
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#node_update2404554648"><tt>node_update</tt></a>
object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#node_update2404554648"><tt>node_update</tt></a> &amp;
get_node_update
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#node_update2404554648"><tt>node_update</tt></a>
object.</p>
</td>
</tr>
</table>
<h3><a name="link10" id="link10">Find Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#iterator10418194"><tt>iterator</tt></a>
lower_bound
(<a href=
"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
</pre>
</td>
<td>
<p>Returns an <a href=
"#iterator10418194"><tt>iterator</tt></a> corresponding
to the entry whose key is the smallest one at least as
large as <span class="c1"><tt>r_key</tt></span>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#const_iterator98626788"><tt>const_iterator</tt></a>
lower_bound
(<a href=
"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key) <b>const</b>
</pre>
</td>
<td>
<p>Returns a <tt><b>const</b></tt> <a href=
"#iterator10418194"><tt>iterator</tt></a> corresponding
to the entry whose key is the smallest one at least as
large as <span class="c1"><tt>r_key</tt></span>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#iterator10418194"><tt>iterator</tt></a>
upper_bound
(<a href=
"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
</pre>
</td>
<td>
<p>Returns an <a href=
"#iterator10418194"><tt>iterator</tt></a> corresponding
to the entry whose key is the smallest one larger than
<span class="c1"><tt>r_key</tt></span>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#const_iterator98626788"><tt>const_iterator</tt></a>
upper_bound
(<a href=
"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key) <b>const</b>
</pre>
</td>
<td>
<p>Returns a <a href=
"#const_iterator98626788"><tt>const_iterator</tt></a>
corresponding to the entry whose key is the smallest one
larger than <span class="c1"><tt>r_key</tt></span>.</p>
</td>
</tr>
</table>
<h3><a name="link11" id="link11">Erase Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#iterator10418194"><tt>iterator</tt></a>
erase
(<a href="#iterator10418194"><tt>iterator</tt></a> it)
</pre>
</td>
<td>
<p>Erases the value_type corresponding to the <a href=
"#iterator10418194"><tt>iterator</tt></a> <span class=
"c1"><tt>it</tt></span>. Returns the <a href=
"#iterator10418194"><tt>iterator</tt></a> corresponding
to the next value_type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
erase
(<a href=
"#reverse_iterator1896910345"><tt>reverse_iterator</tt></a> it)
</pre>
</td>
<td>
<p>Erases the value_type corresponding to the <a href=
"#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
<span class="c1"><tt>it</tt></span>. Returns the <a href=
"#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
corresponding to the previous value_type.</p>
</td>
</tr>
</table>
<h3><a name="link12" id="link12">Iteration Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
rbegin
()
</pre>
</td>
<td>
<p>Returns a <a href=
"#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
corresponding to the last value_type in the
container.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href=
"#const_reverse_iterator4151293083"><tt>const_reverse_iterator</tt></a>
rbegin
() <b>const</b>
</pre>
</td>
<td>
<p>Returns a <a href=
"#const_reverse_iterator4151293083"><tt>const_reverse_iterator</tt></a>
corresponding to the last value_type in the
container.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
rend
()
</pre>
</td>
<td>
<p>Returns a <a href=
"#reverse_iterator1896910345"><tt>reverse_iterator</tt></a>
corresponding to the just-before-first value_type in the
container.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href=
"#const_reverse_iterator4151293083"><tt>const_reverse_iterator</tt></a>
rend
() <b>const</b>
</pre>
</td>
<td>
<p>Returns a <a href=
"#const_reverse_iterator4151293083"><tt>const_reverse_iterator</tt></a>
corresponding to the just-before-first value_type in the
container.</p>
</td>
</tr>
</table>
<h3><a name="link13" id="link13">Split and join
Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
join
(<span class=
"c2"><tt>basic_tree</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Joins two trees. When this function returns,
<span class="c1"><tt>other</tt></span> will be
empty.</p>
<p>When calling this method, <span class=
"c1"><tt>other</tt></span>'s keys must be all larger or
all smaller than this object's keys, and <span class=
"c1"><tt>other</tt></span>'s policies must be
equivalent to this object's policies.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
split
(<a href=
"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key,
<span class=
"c2"><tt>basic_tree</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Splits into two trees. When this function returns,
<span class="c1"><tt>other</tt></span> will contain
only keys larger than <span class=
"c1"><tt>r_key</tt></span>.</p>
<p>When calling this method, <span class=
"c1"><tt>other</tt></span>'s policies must be
equivalent to this object's policies.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,383 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>tree::const_node_iterator
Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt><span class=
"c2"><tt>tree</tt></span>::const_node_iterator</tt>
Interface</h1>
<p>Const node iterator.</p>
<p>This is an &amp;qout;iterator to an iterator&amp;qout; - it
iterates over nodes, and de-referencing it returns one of the
tree's iterators</p>
<h2><a name="link1" id="link1">Public Types and
Constants</a></h2>
<h3><a name="link2" id="link2">Iterator Definitions</a></h3>
<table class="c2" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="iterator_category2821876439" id=
"iterator_category2821876439">iterator_category</a>
</pre>
</td>
<td>
<pre>
trivial_iterator_tag
</pre>
</td>
<td>
<p>Category.</p>
<p>This tag identifies that the iterator has none of the
STL's iterators' movement abilities.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="difference_type868028452" id=
"difference_type868028452">difference_type</a>
</pre>
</td>
<td>
<pre class="c1">
void
</pre>
</td>
<td>
<p>Difference type.</p>
</td>
</tr>
</table>
<h3><a name="link3" id="link3">Value-Type Definitions</a></h3>
<p>Note that a node iterator's value type is actually a tree
iterator.</p>
<table class="c2" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="value_type279018186" id=
"value_type279018186">value_type</a>
</pre>
</td>
<td>
<pre>
<a href=
"container_base.html#const_iterator98626788"><span class="c2"><tt>container_base</tt></span>::const_iterator</a>
</pre>
</td>
<td>
<p>Iterator's value type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="reference54418471" id="reference54418471">reference</a>
</pre>
</td>
<td>
<pre>
<a href=
"container_base.html#const_iterator98626788"><span class="c2"><tt>container_base</tt></span>::const_iterator</a>
</pre>
</td>
<td>
<p>Iterator's reference type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="const_reference495461441" id=
"const_reference495461441">const_reference</a>
</pre>
</td>
<td>
<pre>
<a href=
"container_base.html#const_iterator98626788"><span class="c2"><tt>container_base</tt></span>::const_iterator</a>
</pre>
</td>
<td>
<p>Iterator's const <a href=
"#reference54418471"><tt>reference</tt></a> type.</p>
</td>
</tr>
</table>
<h3><a name="link4" id="link4">Metadata Definitions</a></h3>
<p>These are only defined if <a href=
"basic_tree.html#Node_Update841554648"><span class="c2">
<tt>basic_tree</tt></span>::Node_Update</a>
is not <a href="null_tree_node_update.html"><span class=
"c2"><tt>null_tree_node_update</tt></span></a></p>
<table class="c2" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="metadata_type2849297114" id=
"metadata_type2849297114">metadata_type</a>
</pre>
</td>
<td>
<pre>
<tt><b>typename</b></tt> <a href=
"basic_tree.html#Node_Update841554648"><span class="c2"><tt>basic_tree</tt></span>::Node_Update</a><tt>::metadata_type</tt>
</pre>
</td>
<td>
<p>Metadata type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="const_metadata_reference1108857465" id=
"const_metadata_reference1108857465">const_metadata_reference</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> Allocator::<b>template</b> rebind&lt;
<a href=
"#metadata_type2849297114"><tt>metadata_type</tt></a>&gt;::other::<a href="#const_reference495461441"><tt>const_reference</tt></a>
</pre>
</td>
<td>
<p>Const metadata <a href=
"#reference54418471"><tt>reference</tt></a> type.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Public Methods</a></h2>
<h3><a name="link6" id="link6">Constructors, Destructor, and
Related</a></h3>
<table class="c2" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b>
const_node_iterator
()
</pre>
</td>
<td>
<p>Default constructor.</p>
</td>
</tr>
</table>
<h3><a name="link7" id="link7">Access Methods</a></h3>
<table class="c2" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <a href=
"#const_reference495461441"><tt>const_reference</tt></a>
<b>operator</b>*
() <b>const</b>
</pre>
</td>
<td>
<p>Access.</p>
</td>
</tr>
</table>
<h3><a name="link8" id="link8">Metadata Access Methods</a></h3>
<p>These are only defined if <a href=
"basic_tree.html#Node_Update841554648"><span class="c2">
<tt>basic_tree</tt></span>::Node_Update</a>
is not <a href="null_tree_node_update.html"><span class=
"c2"><tt>null_tree_node_update</tt></span></a></p>
<table class="c2" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <a href=
"#const_metadata_reference1108857465"><tt>const_metadata_reference</tt></a>
get_metadata
() <b>const</b>
</pre>
</td>
<td>
<p>Metadata access.</p>
</td>
</tr>
</table>
<h3><a name="link9" id="link9">Movement Methods</a></h3>
<table class="c2" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <span class="c2"><tt>const_node_iterator</tt></span>
get_l_child
() <b>const</b>
</pre>
</td>
<td>
<p>Returns the const node iterator associated with the
left node.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <span class="c2"><tt>const_node_iterator</tt></span>
get_r_child
() <b>const</b>
</pre>
</td>
<td>
<p>Returns the const node iterator associated with the
right node.</p>
</td>
</tr>
</table>
<h3><a name="link10" id="link10">Comparison Methods</a></h3>
<table class="c2" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
<b>operator</b>==
(<b>const</b> <span class=
"c2"><tt>const_node_iterator</tt></span> &amp;other) <b>const</b>
</pre>
</td>
<td>
<p>Compares to a different iterator object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
<b>operator</b>!=
(<b>const</b> <span class=
"c2"><tt>const_node_iterator</tt></span> &amp;other) <b>const</b>
</pre>
</td>
<td>
<p>Compares (negatively) to a different iterator
object.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>basic_tree_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>basic_tree_tag</tt> Interface</h1>
<p>Basic tree-like data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="associative_container_tag.html"><span class=
"c2"><tt>associative_container_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>binary_heap_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>binary_heap_tag</tt> Interface</h1>
<p>Binary-heap (array-based) data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="priority_queue_tag.html"><span class=
"c2"><tt>priority_queue_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>binomial_heap_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>binomial_heap_tag</tt> Interface</h1>
<p>Binomial-heap data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="priority_queue_tag.html"><span class=
"c2"><tt>priority_queue_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,532 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>cc_hash_max_collision_check_resize_trigger
Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>cc_hash_max_collision_check_resize_trigger</tt>
Interface</h1>
<p>A resize trigger policy based on collision checks. It keeps
the simulated load factor lower than some given load
factor.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="External_Load_Access1313998607" id=
"External_Load_Access1313998607"><b>bool</b> External_Load_Access </a>
</pre>
</td>
<td>
<p>Specifies whether the load factor can be accessed
externally. The two options have different trade-offs in
terms of flexibility, genericity, and encapsulation.</p>
</td>
<td><tt><b>false</b></tt></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="external_load_access3976598639" id=
"external_load_access3976598639">external_load_access</a>
</pre>
</td>
<td>
<pre>
<a href=
"#External_Load_Access1313998607"><tt>External_Load_Access</tt></a>
</pre>
</td>
<td>
<p>Indicates whether loads can be accessed externally</p>
</td>
</tr>
</table>
<h2><a name="link4" id="link4">Public Methods</a></h2>
<h3><a name="link5" id="link5">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
cc_hash_max_collision_check_resize_trigger
(float load = 0.5)
</pre>
</td>
<td>
<p>Default constructor, or constructor taking
<span class="c1"><tt>load</tt></span>, a load factor
which it will attempt to maintain.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>cc_hash_max_collision_check_resize_trigger</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h3><a name="link6" id="link6">Load Access Methods</a></h3>
<p>These methods are only available if the external access
parameter is set.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> float
get_load
() <b>const</b>
</pre>
</td>
<td>
<p>Returns the current load.</p>
<p>Calling this method will not compile when <a href=
"#External_Load_Access1313998607"><tt>External_Load_Access</tt></a>
== <tt><b>false</b></tt>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
set_load
(float load)
</pre>
</td>
<td>
<p>Sets the <span class="c1"><tt>load</tt></span>; does
not resize the container.</p>
<p>It is the responsibility of the user to pass an
appropriate <span class="c1"><tt>load</tt></span> to this
function. Calling this method will not compile when
<a href=
"#External_Load_Access1313998607"><tt>External_Load_Access</tt></a>
== <tt><b>false</b></tt>.</p>
</td>
</tr>
</table>
<h2><a name="link7" id="link7">Protected Methods</a></h2>
<h3><a name="link8" id="link8">Insert Search
Notifications.</a></h3>
<p>Notifications called during an insert operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link9" id="link9">Find Search
Notifications.</a></h3>
<p>Notifications called during a find operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link10" id="link10">Erase Search
Notifications.</a></h3>
<p>Notifications called during an insert operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link11" id="link11">Content Change
Notifications</a></h3>
<p>Notifications called when the content of the table changes
in a way that can affect the resize policy.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_inserted
(<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
</pre>
</td>
<td>
<p>Notifies an element was inserted.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erased
(<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
</pre>
</td>
<td>
<p>Notifies an element was erased.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_cleared
()
</pre>
</td>
<td>
<p>Notifies the table was cleared.</p>
</td>
</tr>
</table>
<h3><a name="link12" id="link12">Size Change
Notifications</a></h3>
<p>Notifications called when the table changes size.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_resized
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Notifies the table was resized as a result of this
object's signifying that a resize is needed.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_externally_resized
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Notifies the table was resized externally.</p>
</td>
</tr>
</table>
<h3><a name="link13" id="link13">Queries</a></h3>
<p>Called to query whether/how to resize.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
is_resize_needed
() <b>const</b>
</pre>
</td>
<td>
<p>Queries whether a resize is needed.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
is_grow_needed
(<a href=
"#size_type55424436"><tt>size_type</tt></a> size, <a href=
"#size_type55424436"><tt>size_type</tt></a> num_entries) <b>const</b>
</pre>
</td>
<td>
<p>Queries whether a grow is needed.</p>
<p>This method is called only if this object indicated is
needed.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -1,724 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>cc_hash_table Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>cc_hash_table</tt> Interface</h1>
<p>A concrete collision-chaining hash-based associative
container.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Key2501" id="Key2501"><b>typename</b> Key</a>
</pre>
</td>
<td>
<p>Key type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Mapped318655" id="Mapped318655"><b>typename</b> Mapped</a>
</pre>
</td>
<td>
<p>Mapped type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Hash_Fn1515835" id=
"Hash_Fn1515835"><b>class</b> Hash_Fn </a>
</pre>
</td>
<td>
<p>Hash functor.</p>
</td>
<td>
<pre>
__gnu_cxx::hash&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>if using gcc;
<pre>
stdext::hash_value&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>if using Visual C++ .net
</td>
</tr>
<tr>
<td>
<pre>
<a name="Eq_Fn60085" id="Eq_Fn60085"><b>class</b> Eq_Fn </a>
</pre>
</td>
<td>
<p>Equivalence functor.</p>
</td>
<td>
<pre>
std::equal_to&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Comb_Hash_Fn320611039" id=
"Comb_Hash_Fn320611039"><b>class</b> Comb_Hash_Fn </a>
</pre>
</td>
<td>
<p>Combining hash functor.</p>
<p>If <a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a> is
not <a href="null_hash_fn.html"><span class=
"c2"><tt>null_hash_fn</tt></span></a>, then this is the
ranged-hash functor; otherwise, this is the range-hashing
functor.</p>
<p>(See <a href=
"hash_based_containers.html#hash_policies">Design::Hash-Based
Containers::Hash Policies</a>.)</p>
</td>
<td>
<pre>
<a href="direct_mask_range_hashing.html"><span class=
"c2"><tt>direct_mask_range_hashing</tt></span></a>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Resize_Policy566860465" id=
"Resize_Policy566860465"><b>class</b> Resize_Policy </a>
</pre>
</td>
<td>
<p>Resize policy.</p>
</td>
<td>
If <tt><a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a></tt>
is <tt><a href=
"direct_mask_range_hashing.html"><span class=
"c2"><tt>direct_mask_range_hashing</tt></span></a></tt>,
then
<pre>
<a href="hash_standard_resize_policy.html"><span class=
"c2"><tt>hash_standard_resize_policy</tt></span></a>&lt;
<a href="hash_exponential_size_policy.html"><span class=
"c2"><tt>hash_exponential_size_policy</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>::size_type&gt;,
<a href="hash_load_check_resize_trigger.html"><span class=
"c2"><tt>hash_load_check_resize_trigger</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>::size_type&gt;,
<b>false</b>,
<b>typename</b> <a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>::size_type&gt;
</pre>otherwise,
<pre>
<a href="hash_standard_resize_policy.html"><span class=
"c2"><tt>hash_standard_resize_policy</tt></span></a>&lt;
<a href="hash_exponential_size_policy.html"><span class=
"c2"><tt>hash_exponential_size_policy</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>::size_type&gt;,
<a href="hash_load_check_resize_trigger.html"><span class=
"c2"><tt>hash_load_check_resize_trigger</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>::size_type&gt;,
<b>false</b>,
<b>typename</b> <a href=
"#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>::size_type&gt;
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Store_Hash218262104" id=
"Store_Hash218262104"><b>bool</b> Store_Hash </a>
</pre>
</td>
<td>
<p>Indicates whether the hash value will be stored along
with each key.</p>
<p>If <tt><a href=
"#hash_fn2015995"><tt>hash_fn</tt></a></tt> is <a href=
"null_hash_fn.html"><span class=
"c2"><tt>null_hash_fn</tt></span></a>, then the container
will not compile if this value is
<tt><b>true</b></tt></p>
</td>
<td>
<pre>
<tt><b>false</b></tt>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator </a>
</pre>
</td>
<td>
<p>Allocator type.</p>
</td>
<td>
<pre>
std::allocator&lt;<b>char</b>&gt;
</pre>
</td>
</tr>
</table>
<h2><a name="link2" id="link2">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="basic_hash_table.html"><span class=
"c2"><tt>basic_hash_table</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Types and
Constants</a></h2>
<h3><a name="link4" id="link4">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="hash_fn2015995" id="hash_fn2015995">hash_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a>
</pre>
</td>
<td>
<p>Hash functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="eq_fn80245" id="eq_fn80245">eq_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Eq_Fn60085"><tt>Eq_Fn</tt></a>
</pre>
</td>
<td>
<p>Equivalence functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="resize_policy4084493169" id=
"resize_policy4084493169">resize_policy</a>
</pre>
</td>
<td>
<pre>
<a href="#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
</pre>
</td>
<td>
<p>Resize policy type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="comb_hash_fn1883611199" id=
"comb_hash_fn1883611199">comb_hash_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Comb_Hash_Fn320611039"><tt>Comb_Hash_Fn</tt></a>
</pre>
</td>
<td>
<p>Combining hash functor type.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Public Methods</a></h2>
<h3><a name="link6" id="link6">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
cc_hash_table
()
</pre>
</td>
<td>
<p>Default constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
cc_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a> object of
the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
cc_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, and <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
cc_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a> &amp;r_comb_hash_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, and <span class=
"c1"><tt>r_comb_hash_fn</tt></span> will be copied by the
<a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
cc_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a> &amp;r_comb_hash_fn,
<b>const</b> <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a> &amp;r_resize_policy)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, <span class=
"c1"><tt>r_comb_hash_fn</tt></span> will be copied by the
<a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a>
object of the container object, and <span class=
"c1"><tt>r_resize_policy</tt></span> will be copied by
the <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
cc_hash_table
(It first_it,
It last_it)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of
value_types. The value_types between <span class=
"c1"><tt>first_it</tt></span> and <span class=
"c1"><tt>last_it</tt></span> will be inserted into the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
cc_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects. The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
cc_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, and <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
cc_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a> &amp;r_comb_hash_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, and <span class=
"c1"><tt>r_comb_hash_fn</tt></span> will be copied by the
<a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
cc_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a> &amp;r_comb_hash_fn,
<b>const</b> <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a> &amp;r_resize_policy)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, <span class=
"c1"><tt>r_comb_hash_fn</tt></span> will be copied by the
<a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a>
object of the container object, and <span class=
"c1"><tt>r_resize_policy</tt></span> will be copied by
the <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
cc_hash_table
(<b>const</b> <span class=
"c2"><tt>cc_hash_table</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Copy constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~cc_hash_table
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<span class="c2"><tt>cc_hash_table</tt></span> &amp;
<b>operator</b>=
(<b>const</b> <span class=
"c2"><tt>cc_hash_table</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Assignment operator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>cc_hash_table</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h3><a name="link7" id="link7">Policy Access Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a> &amp;
get_comb_hash_fn
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a>
object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a> &amp;
get_comb_hash_fn
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#comb_hash_fn1883611199"><tt>comb_hash_fn</tt></a>
object.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>cc_hash_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>cc_hash_tag</tt> Interface</h1>
<p>Collision-chaining hash data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="basic_hash_tag.html"><span class=
"c2"><tt>basic_hash_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,118 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Concepts</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Concepts</h1>
<h2><a name="concepts_find_and_range_iterators" id=
"concepts_find_and_range_iterators">Point and Range Methods and
Iterators</a></h2>
<p>A point-type iterator is an iterator that refers to a
specific element, <i>e.g.</i> as returned through an
associative-container's <tt>find</tt> method; a range-type
iterator is an iterator that is used to go over a sequence of
elements, <i>e.g.</i>, as returned by a container's
<tt>find</tt> method. A point-type method is a method that
returns a point-type iterator; a range-type method is a method
that returns a range-type iterator.</p>
<p>For most containers, these types are synonymous; for
self-organizing containers, such as hash-based containers or
priority queues, these are inherently different (in any
implementation, including that of the STL), but in
<tt>pb_ds</tt> this is made explicit - they are distinct
types.</p>
<h2><a name="invalidation_guarantees" id=
"invalidation_guarantees">Invalidation Guarantees</a></h2>
<p>If one manipulates a container object, then iterators
previously obtained from it can be invalidated. In some cases a
previously-obtained iterator cannot be de-referenced; in other
cases, the iterator's next or previous element might have
changed unpredictably. This corresponds exactly to the question
whether a point-type or range-type iterator (see previous
concept) is valid or not. In <tt>pb_ds</tt> one can query a
container (in compile time) what are its invalidation
guarantees.</p>
<h2><a name="prm_sec" id="prm_sec">Primary and Secondary Keys
and Associative Containers</a></h2>
<p>In <tt>pb_ds</tt> there are no associative containers which
allow multiple values with equivalent keys (such as the STL's
<tt>std::multimap</tt>, for example). Instead, one maps the
unique part of a key - the primary key, into an
associative-container of the (originally) non-unique parts of
the key - the secondary key. A primary associative-container is
an associative container of primary keys; a secondary
associative-container is an associative container of secondary
keys.</p>
<h2><a name="concepts_null_policies" id=
"concepts_null_policies">Null Policy Classes</a></h2>
<p>Associative containers are typically parametrized by
various policies. For example, a hash-based associative
container is parametrized by a hash-functor, transforming each
key into an non-negative numerical type. Each such value is
then further mapped into a position within the table. The
mapping of a key into a position within the table is therefore
a two-step process.</p>
<p>In some cases, instantiations are <i>redundant</i>. For
example, when the keys are integers, it is possible to use a
<i>redundant</i> hash policy, which transforms each key into
its value.</p>
<p>In some other cases, these policies are <i>irrelevant</i>.
For example, a hash-based associative container might transform
keys into positions within a table by a different method than
the two-step method described above. In such a case, the hash
functor is simply irrelevant.</p>
<p><tt>pb_ds</tt> uses special pre-defined "null policies"
classes for these cases. Some null policies in <tt>pb_ds</tt>
are:</p>
<ol>
<li><a href=
"null_mapped_type.html"><tt>null_mapped_type</tt></a></li>
<li><a href=
"null_tree_node_update.html"><tt>null_tree_node_update</tt></a></li>
<li><a href=
"null_trie_node_update.html"><tt>null_trie_node_update</tt></a></li>
<li><a href=
"null_hash_fn.html"><tt>null_hash_fn</tt></a></li>
<li><a href=
"null_probe_fn.html"><tt>null_probe_fn</tt></a></li>
</ol>
<p>A "set" in <tt>pb_ds</tt>, for example, is an associative
container with its <tt>Data_Parameter</tt> instantiated by
<a href="null_mapped_type.html"><tt>null_mapped_type</tt></a>.
<a href=
"tree_based_containers.html#invariants">Design::Tree-Based
Containers::Node Invariants</a> explains another case where a
null policy is needed.</p>
</div>
</body>
</html>

View File

@ -1,22 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Contact</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Contact</h1>
<p>For anything relevant, please write to <a href=
"mailto:pbassoc@gmail.com">pbassoc@gmail.com</a></p>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,418 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="11in"
height="8.5in"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.43"
version="1.0"
sodipodi:docbase="/mnt/share/src/policy_based_data_structures/current/pb_ds/doc"
sodipodi:docname="container_cd.svg"
inkscape:export-filename="/mnt/share/src/policy_based_data_structures/current/pb_ds/doc/container_cd.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Mstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mstart"
style="overflow:visible">
<path
id="path3311"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.4)" />
</marker>
<marker
inkscape:stockid="Arrow2Sstart"
orient="auto"
refY="0"
refX="0"
id="Arrow2Sstart"
style="overflow:visible">
<path
id="path3319"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(0.3,0,0,0.3,-1.5,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Sstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Sstart"
style="overflow:visible">
<path
id="path3337"
d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="scale(0.2,0.2)" />
</marker>
<marker
inkscape:stockid="Arrow2Send"
orient="auto"
refY="0"
refX="0"
id="Arrow2Send"
style="overflow:visible">
<path
id="path3316"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-0.3,0,0,-0.3,1.5,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Mend"
orient="auto"
refY="0"
refX="0"
id="Arrow2Mend"
style="overflow:visible">
<path
id="path3322"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-0.6,0,0,-0.6,3,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible">
<path
id="path3346"
d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="scale(-0.8,-0.8)" />
</marker>
<marker
inkscape:stockid="Arrow2Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lstart"
style="overflow:visible">
<path
id="path3331"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(1.1,0,0,1.1,-5.5,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow2Lend"
style="overflow:visible">
<path
id="path3328"
style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="matrix(-1.1,0,0,-1.1,5.5,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="396.81316"
inkscape:cy="280"
inkscape:document-units="in"
inkscape:current-layer="layer1"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="973"
inkscape:window-x="0"
inkscape:window-y="0"
gridtolerance="0.125in"
guidetolerance="0.125in">
<sodipodi:guide
orientation="horizontal"
position="629"
id="guide1307" />
<sodipodi:guide
orientation="horizontal"
position="449"
id="guide1309" />
<sodipodi:guide
orientation="horizontal"
position="269"
id="guide1311" />
<sodipodi:guide
orientation="vertical"
position="496"
id="guide1313" />
<sodipodi:guide
orientation="vertical"
position="361"
id="guide1315" />
<sodipodi:guide
orientation="vertical"
position="226"
id="guide1317" />
<sodipodi:guide
orientation="vertical"
position="631"
id="guide1319" />
<sodipodi:guide
orientation="vertical"
position="766"
id="guide1321" />
<sodipodi:guide
orientation="vertical"
position="91"
id="guide1345" />
<sodipodi:guide
orientation="vertical"
position="901"
id="guide1347" />
<sodipodi:guide
orientation="horizontal"
position="539"
id="guide3390" />
<sodipodi:guide
orientation="horizontal"
position="359"
id="guide3392" />
<sodipodi:guide
orientation="vertical"
position="280.5"
id="guide3324" />
<sodipodi:guide
orientation="vertical"
position="172"
id="guide3326" />
<sodipodi:guide
orientation="vertical"
position="388"
id="guide3328" />
<sodipodi:guide
orientation="vertical"
position="711.5"
id="guide3340" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Benjamin Kosnik</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1425"
width="141.64481"
height="23.200001"
x="209.57762"
y="382.56177" />
<rect
y="382.56177"
x="425.57761"
height="23.200001"
width="141.64481"
id="rect3376"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3378"
width="141.64481"
height="23.200001"
x="640.77765"
y="382.56177" />
<text
sodipodi:linespacing="100%"
id="use1329"
y="397.09772"
x="497.20001"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1703"
x="497.20001"
y="397.09772">list_update</tspan><tspan
sodipodi:role="line"
id="tspan1705"
x="497.20001"
y="406.69772" /></text>
<text
xml:space="preserve"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="712.40002"
y="397.09772"
id="use1337"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1707"
x="712.40002"
y="397.09772">basic_hash_table</tspan></text>
<text
xml:space="preserve"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="282"
y="397.09772"
id="text1339"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1701"
x="282"
y="397.09772">basic_tree</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3418"
width="141.64481"
height="23.200001"
x="101.57762"
y="472.5618" />
<rect
y="472.5618"
x="317.57761"
height="23.200001"
width="141.64481"
id="rect3420"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3422"
width="141.64481"
height="23.200001"
x="533.57764"
y="472.5618" />
<rect
y="472.5618"
x="748.77765"
height="23.200001"
width="141.64481"
id="rect3424"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="171.20001"
y="486.29773"
id="text3394"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1715"
x="171.20001"
y="486.29773">tree</tspan><tspan
sodipodi:role="line"
id="tspan1717"
x="171.20001"
y="495.89773" /></text>
<text
sodipodi:linespacing="100%"
id="text3400"
y="486.29773"
x="386.39999"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1709"
x="386.39999"
y="486.29773">trie</tspan><tspan
sodipodi:role="line"
id="tspan1711"
x="386.39999"
y="495.89773" /></text>
<text
sodipodi:linespacing="100%"
id="text3406"
y="486.29773"
x="601.20001"
style="font-size:9.60000038px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan1713"
x="601.20001"
y="486.29773">cc_hash_table</tspan></text>
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="818"
y="486.29773"
id="text3412"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan1719"
x="818"
y="486.29773">gp_hash_table</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3380"
width="141.64481"
height="23.200001"
x="425.57764"
y="292.56177" />
<text
xml:space="preserve"
style="font-size:9.60000038;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.5625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="497.20001"
y="307.09772"
id="text1323"
sodipodi:linespacing="100%"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:export-filename="/mnt/share/src/policy_based_data_structures/pb_ds_images/container_diagram.png"><tspan
sodipodi:role="line"
id="tspan1369"
x="497.20001"
y="307.09772">container_base</tspan></text>
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.97031623px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 170.97058,472.5 L 170.97058,451 L 387.51871,450 L 387.51871,472.5"
id="path2244" />
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 280.5,450.53297 L 280.5,410.62445"
id="path3332" />
<path
id="path3353"
d="M 601.47058,472.5 L 601.47058,451 L 818.01871,450 L 818.01871,472.5"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.97031623px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3355"
d="M 711,450.53297 L 711,410.62445"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path3344"
d="M 281.18218,383.28102 L 281.18218,361.78102 L 711.79281,360.78102 L 711.79281,383.28102"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.3682909px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3347"
d="M 497.75146,383.49616 L 497.75146,322.77107"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,24 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>container _tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>container _tag</tt> Interface</h1>
<p>Basic data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
</div>
</body>
</html>

View File

@ -1,259 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>counter_lu_policy Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>counter_lu_policy</tt> Interface</h1>
<p>A list-update policy that moves elements to the front of the
list based on the counter algorithm.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/list_update_policy.hpp"><tt>list_update_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Max_Count39887466" id=
"Max_Count39887466">size_t Max_Count </a>
</pre>
</td>
<td>
<p>Maximum count.</p>
<p>When some element is accessed this number of times, it
will be moved to the front of the list.</p>
</td>
<td>5</td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator </a>
</pre>
</td>
<td>
<p>Allocator type.</p>
<p>This is used only for definitions, e.g., the size
type.</p>
</td>
<td>
<pre>
std::allocator&lt;<b>char</b>&gt;
</pre>
</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="allocator48440069" id="allocator48440069">allocator</a>
</pre>
</td>
<td>
<pre>
<a href="#Allocator35940069"><tt>Allocator</tt></a>
</pre>
</td>
<td>
<p><a href="#Allocator35940069"><tt>Allocator</tt></a>
type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="max_count52407466" id="max_count52407466">max_count</a>
</pre>
</td>
<td>
<pre>
<a href="#Max_Count39887466"><tt>Max_Count</tt></a>
}
</pre>
</td>
<td>
<p>Maximum count.</p>
</td>
</tr>
</table>
<h3><a name="link4" id="link4">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> <a href=
"#allocator48440069"><tt>allocator</tt></a>::size_type
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h3><a name="link5" id="link5">Metadata-Type
Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="metadata_type2849297114" id=
"metadata_type2849297114">metadata_type</a>
</pre>
</td>
<td>
<pre>
Some class containing a counter.
</pre>
</td>
<td>
<p>Metadata on which this functor operates.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="metadata_reference583863863" id=
"metadata_reference583863863">metadata_reference</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> <a href=
"#Allocator35940069"><tt>Allocator</tt></a>::<b>template</b> rebind&lt;
<a href=
"#metadata_type2849297114"><tt>metadata_type</tt></a>&gt;::other::reference
</pre>
</td>
<td>
<p>Reference to metadata on which this functor
operates.</p>
</td>
</tr>
</table>
<h2><a name="link6" id="link6">Public Methods</a></h2>
<h3><a name="link7" id="link7">Metadata Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#metadata_type2849297114"><tt>metadata_type</tt></a>
<b>operator</b>()
() <b>const</b>
</pre>
</td>
<td>
<p>Creates a metadata object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>bool</b>
<b>operator</b>()
(<a href=
"#metadata_reference583863863"><tt>metadata_reference</tt></a> r_metadata) <b>const</b>
</pre>
</td>
<td>
<p>Decides whether a metadata object should be moved to
the front of the list.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,96 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Design</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Design</h1>
<p>The <tt>pb_ds</tt> namespace contains:</p>
<ol>
<li>Exception classes (see <a href=
"interface.html#exceptions_common">Interface::Exceptions::Common</a>)</li>
<li>Invalidation-guarantee tags (see <a href=
"ds_gen.html#inv_guar">Design::Invalidation Guarantees</a>
and <a href=
"interface.html#ds_inv_tag">Interface::Data-Structure Tags
and Traits::Invalidation-Guarantee Tags</a>).</li>
<li>Associative Containers (see <a href=
"tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>, <a href=
"trie_based_containers.html">Design::Associative
Containers::Trie-Based Containers</a>, <a href=
"hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a>, and <a href=
"lu_based_containers.html">Design::Associative
Containers::List-Based Containers</a>, and <a href=
"interface.html#containers_assoc">Interface::Containers::Associative
Containers</a>).</li>
<li>Associative Container tags and traits
(see <a href="ds_gen.html">Design::Associative
Containers::Data-Structure Genericity</a>, <a href=
"interface.html#ds_ts_assoc">Interface::Data-Structure Tags
and Traits::Data-Structure Tags::Associative-Containers</a>,
and <a href=
"interface.html#container_traits">Interface::Data-Structure Tags and
Traits::Data-Structure
Traits::Associative-Containers</a>).</li>
<li>Associative Container policies (see
<a href="tree_based_containers.html">Design::Associative
Containers::Tree-Based Containers</a>, <a href=
"trie_based_containers.html">Design::Associative
Containers::Trie-Based Containers</a>, <a href=
"hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a>, and <a href=
"lu_based_containers.html">Design::Associative
Containers::List-Based Containers</a>, and <a href=
"interface.html#ds_policy_classes">Interface::Container
Policy Classes</a>).</li>
<li>Mapped types for setting the mapping semantics of
associative containers (see <a href=
"tutorial.html#assoc_ms">Tutorial::Associative
Containers::Associative Containers Others than Maps</a> and
<a href="interface.html#ds_pol">Interface::Mapped-Type
Policies</a>).</li>
<li>Priority Queues (see <a href="pq_design.html">Design::Priority
Queues</a> and <a href=
"interface.html#containers_pq">Interface::Containers::Priority
Queues</a>).</li>
<li>Priority Queue tags and traits
(see <a href="pq_design.html#pq_traits">Design::Priority
Queues::Traits</a>, <a href=
"interface.html#ds_ts_pq">Interface::Data-Structure Tags and
Traits::Data-Structure Tags::Priority Queues</a>, and
<a href="interface.html#container_traits">Interface::Data-Structure
Tags and Traits::Data-Structure Traits::Priority
Queues</a>).</li>
</ol>
<p><a href="assoc_design.html">Associative-Container Design</a>
describes associative-container design.</p>
<p><a href="pq_design.html">Priority-Queue Design</a> describes
priority-queue design.</p>
</div>
</body>
</html>

View File

@ -1,167 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>direct_mask_range_hashing Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>direct_mask_range_hashing</tt> Interface</h1>
<p>A mask range-hashing class (uses a bit-mask).</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h2><a name="link4" id="link4">Public Methods</a></h2>
<h3><a name="link5" id="link5">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>direct_mask_range_hashing</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h2><a name="link6" id="link6">Protected Methods</a></h2>
<h3><a name="link7" id="link7">Notification Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_resized
(<a href="#size_type55424436"><tt>size_type</tt></a> size)
</pre>
</td>
<td>
<p>Notifies the policy object that the container's size
has changed to <span class="c1"><tt>size</tt></span>.</p>
</td>
</tr>
</table>
<h3><a name="link8" id="link8">Operators.</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <a href="#size_type55424436"><tt>size_type</tt></a>
<b>operator</b>()
(<a href=
"#size_type55424436"><tt>size_type</tt></a> hash) <b>const</b>
</pre>
</td>
<td>
<p>Transforms the hash value <span class=
"c1"><tt>hash</tt></span> into a ranged-hash value (using
a bit-mask).</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,144 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>direct_mod_range_hashing Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>direct_mod_range_hashing</tt> Interface</h1>
<p>A mod range-hashing class (uses the modulo function).</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h2><a name="link4" id="link4">Public Methods</a></h2>
<h3><a name="link5" id="link5">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>direct_mod_range_hashing</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h2><a name="link6" id="link6">Protected Methods</a></h2>
<h3><a name="link7" id="link7">Notification Methods</a></h3>
<h3><a name="link8" id="link8">Operators.</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <a href="#size_type55424436"><tt>size_type</tt></a>
<b>operator</b>()
(<a href=
"#size_type55424436"><tt>size_type</tt></a> hash) <b>const</b>
</pre>
</td>
<td>
<p>Transforms the hash value <span class=
"c1"><tt>hash</tt></span> into a ranged-hash value (using
a modulo operation).</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,34 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>What, me worry?</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h2>Disclaimer and Copyright</h2>
<p>Revised 16 February, 2004</p>&copy; Copyright Ami Tavory and
Vladimir Dreizin, IBM-HRL, 2004, and Benjamin Kosnik, Red Hat,
2004.
<p>Permission to use, copy, modify, sell, and distribute this
software is hereby granted without fee, provided that the above
copyright notice appears in all copies, and that both that
copyright notice and this permission notice appear in
supporting documentation.</p>
<p>None of the above authors, nor IBM Haifa Research
Laboratories, Red Hat, or both, make any representation about
the suitability of this software for any purpose. It is
provided "as is" without express or implied warranty.</p>
</div>
</body>
</html>

View File

@ -1,344 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Data-Structure Genericity</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Data-Structure Genericity</h1>
<h2><a name="problem" id="problem">The Basic Problem</a></h2>
<p>The design attempts to address the following problem. When
writing a function manipulating a generic container object,
what is the behavior of the object? <i>E.g.</i>, suppose one
writes</p>
<pre>
<b>template</b>&lt;<b>typename</b> Cntnr&gt;
<b>void</b>
some_op_sequence(Cntnr &amp;r_container)
{
...
}
</pre>then one needs to address the following questions in the body
of <tt>some_op_sequence</tt>:
<ol>
<li>Which types and methods does <tt>Cntnr</tt> support?
Containers based on hash tables can be queries for the
hash-functor type and object; this is meaningless for
tree-based containers. Containers based on trees can be
split, joined, or can erase iterators and return the
following iterator; this cannot be done by hash-based
containers.</li>
<li>What are the guarantees of <tt>Cntnr</tt>? A container
based on a probing hash-table invalidates all iterators when
it is modified; this is not the case for containers based on
node-based trees. Containers based on a node-based tree can
be split or joined without exceptions; this is not the case
for containers based on vector-based trees.</li>
<li>How does the container maintain its elements? Tree-based
and Trie-based containers store elements by key order;
others, typically, do not. A container based on a splay trees
or lists with update policies "cache" "frequently accessed"
elements; containers based on most other underlying
data structures do not.</li>
</ol>
<p>The remainder of this section deals with these issues.</p>
<h2><a name="ds_hierarchy" id="ds_hierarchy">Container
Hierarchy</a></h2>
<p>Figure <a href="#cd">Container class hierarchy</a> shows the
container hierarchy.</p>
<h6 class="c1"><a name="cd" id="cd"><img src="container_cd.png" alt=
"no image" /></a></h6>
<h6 class="c1">Container class hierarchy.</h6>
<ol>
<li><a href=
"container_base.html"><tt>container_base</tt></a> is an
abstract base class for associative containers.</li>
<li>Tree-Like-Based Associative-Containers:
<ol>
<li><a href=
"basic_tree.html"><tt>basic_tree</tt></a>
is an abstract base class for tree-like-based
associative-containers</li>
<li><a href=
"tree.html"><tt>tree</tt></a>
is a concrete base class for tree-based
associative-containers</li>
<li><a href=
"trie.html"><tt>trie</tt></a>
is a concrete base class trie-based
associative-containers</li>
</ol>
</li>
<li>Hash-Based Associative-Containers:
<ol>
<li><a href=
"basic_hash_table.html"><tt>basic_hash_table</tt></a>
is an abstract base class for hash-based
associative-containers</li>
<li><a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a>
is a concrete collision-chaining hash-based
associative-containers</li>
<li><a href=
"gp_hash_table.html"><tt>gp_hash_table</tt></a>
is a concrete (general) probing hash-based
associative-containers</li>
</ol>
</li>
<li>List-Based Associative-Containers:
<ol>
<li><a href=
"list_update.html"><tt>list_update</tt></a> -
list-based update-policy associative container</li>
</ol>
</li>
</ol>
<p>The hierarchy is composed naturally so that commonality is
captured by base classes. Thus <tt><b>operator[]</b></tt> is
defined <a href=
"container_base.html"><tt>container_base</tt></a>, since
all containers support it. Conversely <tt>split</tt> is defined
in <a href=
"basic_tree.html"><tt>basic_tree</tt></a>,
since only tree-like containers support it. <a href=
"#container_traits">Data-Structure Tags and Traits</a> discusses how
to query which types and methods each container supports.</p>
<h2><a name="container_traits" id="container_traits">Data-Structure Tags and
Traits</a></h2>
<p>Tags and traits are very useful for manipulating generic
types. For example, if <tt>It</tt> is an iterator class, then
<tt><b>typename</b> It::iterator_category</tt> or
<tt><b>typename</b>
std::iterator_traits&lt;It&gt;::iterator_category</tt> will
yield its category, and <tt><b>typename</b>
std::iterator_traits&lt;It&gt;::value_type</tt> will yield its
value type.</p>
<p><tt>pb_ds</tt> contains a tag hierarchy corresponding to the
hierarchy in Figure <a href="#cd">Class hierarchy</a>. The tag
hierarchy is shown in Figure <a href=
"#tag_cd">Data-structure tag class hierarchy</a>.</p>
<h6 class="c1"><a name="tag_cd" id="tag_cd"><img src=
"assoc_container_tag_cd.png" alt="no image" /></a></h6>
<h6 class="c1">Data-structure tag class hierarchy.</h6>
<p><a href=
"container_base.html"><tt>container_base</tt></a>
publicly defines <tt>container_category</tt> as one of the classes in
Figure <a href="#tag_cd">Data-structure tag class
hierarchy</a>. Given any container <tt>Cntnr</tt>, the tag of
the underlying data structure can be found via
<tt><b>typename</b> Cntnr::container_category</tt>.</p>
<p>Additionally, a traits mechanism can be used to query a
container type for its attributes. Given any container
<tt>Cntnr</tt>, then <tt><a href=
"assoc_container_traits.html">__gnu_pbds::container_traits</a>&lt;Cntnr&gt;</tt>
is a traits class identifying the properties of the
container.</p>
<p>To find if a container can throw when a key is erased (which
is true for vector-based trees, for example), one can
use</p><a href=
"assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::erase_can_throw</tt>,
for example.
<p>Some of the definitions in <a href=
"assoc_container_traits.html"><tt>container_traits</tt></a> are
dependent on other definitions. <i>E.g.</i>, if <a href=
"assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::order_preserving</tt>
is <tt><b>true</b></tt> (which is the case for containers based
on trees and tries), then the container can be split or joined;
in this case, <a href=
"assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>
indicates whether splits or joins can throw exceptions (which
is true for vector-based trees); otherwise <a href=
"assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>
will yield a compilation error. (This is somewhat similar to a
compile-time version of the COM model [<a href=
"references.html#mscom">mscom</a>]).</p>
<h2><a name="find_range" id="find_range">Point-Type and
Range-Type Methods and Iterators</a></h2>
<h3><a name="it_unordered" id="it_unordered">Iterators in
Unordered Container Types</a></h3>
<p><tt>pb_ds</tt> differentiates between two types of methods
and iterators: point-type methods and iterators, and range-type
methods and iterators (see <a href=
"motivation.html#assoc_diff_it">Motivation::Associative
Containers::Differentiating between Iterator Types</a> and
<a href="tutorial.html#assoc_find_range">Tutorial::Associative
Containers::Point-Type and Range-Type Methods and
Iterators</a>). Each associative container's interface includes
the methods:</p>
<pre>
const_point_iterator
find(const_key_reference r_key) const;
point_iterator
find(const_key_reference r_key);
std::pair&lt;point_iterator,<b>bool</b>&gt;
insert(const_reference r_val);
</pre>
<p>The relationship between these iterator types varies between
container types. Figure <a href=
"#point_iterators_cd">Point-type and range-type iterators</a>-A
shows the most general invariant between point-type and
range-type iterators: <tt>iterator</tt>, <i>e.g.</i>, can
always be converted to <tt>point_iterator</tt>. Figure <a href=
"#point_iterators_cd">Point-type and range-type iterators</a>-B
shows invariants for order-preserving containers: point-type
iterators are synonymous with range-type iterators.
Orthogonally, Figure <a href="#point_iterators_cd">Point-type
and range-type iterators</a>-C shows invariants for "set"
containers: iterators are synonymous with const iterators.</p>
<h6 class="c1"><a name="point_iterators_cd" id=
"point_iterators_cd"><img src="point_iterators_cd.png" alt=
"no image" /></a></h6>
<h6 class="c1">Point-type and range-type iterators.</h6>
<p>Note that point-type iterators in self-organizing containers
(<i>e.g.</i>, hash-based associative containers) lack movement
operators, such as <tt><b>operator++</b></tt> - in fact, this
is the reason why <tt>pb_ds</tt> differentiates from the STL's
design on this point.</p>
<p>Typically, one can determine an iterator's movement
capabilities in the STL using
<tt>std::iterator_traits&lt;It&gt;iterator_category</tt>, which
is a <tt><b>struct</b></tt> indicating the iterator's movement
capabilities. Unfortunately, none of the STL's predefined
categories reflect a pointer's <u>not</u> having any movement
capabilities whatsoever. Consequently, <tt>pb_ds</tt> adds a
type <a href=
"trivial_iterator_tag.html"><tt>trivial_iterator_tag</tt></a>
(whose name is taken from a concept in [<a href=
"references.html#sgi_stl">sgi_stl</a>]), which is the category
of iterators with no movement capabilities. All other STL tags,
such as <tt>forward_iterator_tag</tt> retain their common
use.</p>
<h3><a name="inv_guar" id="inv_guar">Invalidation
Guarantees</a></h3>
<p><a href=
"motivation.html#assoc_inv_guar">Motivation::Associative
Containers::Differentiating between Iterator
Types::Invalidation Guarantees</a> posed a problem. Given three
different types of associative containers, a modifying
operation (in that example, <tt>erase</tt>) invalidated
iterators in three different ways: the iterator of one
container remained completely valid - it could be de-referenced
and incremented; the iterator of a different container could
not even be de-referenced; the iterator of the third container
could be de-referenced, but its "next" iterator changed
unpredictably.</p>
<p>Distinguishing between find and range types allows
fine-grained invalidation guarantees, because these questions
correspond exactly to the question of whether point-type
iterators and range-type iterators are valid. <a href=
"#invalidation_guarantee_cd">Invalidation guarantees class
hierarchy</a> shows tags corresponding to different types of
invalidation guarantees.</p>
<h6 class="c1"><a name="invalidation_guarantee_cd" id=
"invalidation_guarantee_cd"><img src=
"invalidation_guarantee_cd.png" alt="no image" /></a></h6>
<h6 class="c1">Invalidation guarantees class hierarchy.</h6>
<ol>
<li><a href=
"basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a>
corresponds to a basic guarantee that a point-type iterator,
a found pointer, or a found reference, remains valid as long
as the container object is not modified.</li>
<li><a href=
"point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>
corresponds to a guarantee that a point-type iterator, a
found pointer, or a found reference, remains valid even if
the container object is modified.</li>
<li><a href=
"range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>
corresponds to a guarantee that a range-type iterator remains
valid even if the container object is modified.</li>
</ol>
<p>As shown in <a href=
"tutorial.html#assoc_find_range">Tutorial::Associative
Containers::Point-Type and Range-Type Methods and
Iterators</a>, to find the invalidation guarantee of a
container, one can use</p>
<pre>
<b>typename</b> <a href=
"assoc_container_traits.html">container_traits</a>&lt;Cntnr&gt;::invalidation_guarantee
</pre>
<p>which is one of the classes in Figure <a href=
"#invalidation_guarantee_cd">Invalidation guarantees class
hierarchy</a>.</p>
<p>Note that this hierarchy corresponds to the logic it
represents: if a container has range-invalidation guarantees,
then it must also have find invalidation guarantees;
correspondingly, its invalidation guarantee (in this case
<a href=
"range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>)
can be cast to its base class (in this case <a href=
"point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>).
This means that this this hierarchy can be used easily using
standard metaprogramming techniques, by specializing on the
type of <tt>invalidation_guarantee</tt>.</p>
<p>(These types of problems were addressed, in a more general
setting, in [<a href=
"references.html#meyers96more">meyers96more</a>] - Item 2. In
our opinion, an invalidation-guarantee hierarchy would solve
these problems in all container types - not just associative
containers.)</p>
</div>
</body>
</html>

View File

@ -1,24 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Examples</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Examples</h1>
<p><a href="assoc_examples.html">Associative-Container
Examples</a> shows examples for associative containers;
<a href="pq_examples.html">Priority-Queue Examples</a> shows
examples for priority queues.</p>
</div>
</body>
</html>

View File

@ -1,46 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>container_error Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>container_error</tt> Interface</h1>
<p>Base class for associative-container exceptions.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/exception.hpp"><tt>exception.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
std::logic_error
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -1,891 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>gp_hash_table Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>gp_hash_table</tt> Interface</h1>
<p>A concrete general-probing hash-based associative
container.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Key2501" id="Key2501"><b>typename</b> Key</a>
</pre>
</td>
<td>
<p>Key type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Mapped318655" id="Mapped318655"><b>typename</b> Mapped</a>
</pre>
</td>
<td>
<p>Mapped type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Hash_Fn1515835" id=
"Hash_Fn1515835"><b>class</b> Hash_Fn </a>
</pre>
</td>
<td>
<p>Hash functor.</p>
</td>
<td>
<pre>
__gnu_cxx::hash&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>if using gcc;
<pre>
stdext::hash_value&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>if using Visual C++ .net
</td>
</tr>
<tr>
<td>
<pre>
<a name="Eq_Fn60085" id="Eq_Fn60085"><b>class</b> Eq_Fn </a>
</pre>
</td>
<td>
<p>Equivalence functor.</p>
</td>
<td>
<pre>
std::equal_to&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Comb_Probe_Fn1603930855" id=
"Comb_Probe_Fn1603930855"><b>class</b> Comb_Probe_Fn </a>
</pre>
</td>
<td>
<p>Combining probe functor.</p>
<p>If <a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a> is
<a href="null_hash_fn.html"><span class=
"c2"><tt>null_hash_fn</tt></span></a>, and <a href=
"#Probe_Fn8454835"><tt>Probe_Fn</tt></a> is <a href=
"null_probe_fn.html"><span class=
"c2"><tt>null_probe_fn</tt></span></a>, then this is the
ranged-probe functor; otherwise, this is the
range-hashing functor.</p>
<p>(See <a href=
"hash_based_containers.html#hash_policies">Design::Hash-Based
Containers::Hash Policies</a>.)</p>
</td>
<td><a href="direct_mask_range_hashing.html"><span class=
"c2"><tt>direct_mask_range_hashing</tt></span></a></td>
</tr>
<tr>
<td>
<pre>
<a name="Probe_Fn8454835" id=
"Probe_Fn8454835"><b>class</b> Probe_Fn </a>
</pre>
</td>
<td>
<p>Probe functor.</p>
</td>
<td>
If <tt><a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a></tt>
is <a href="direct_mask_range_hashing.html"><span class=
"c2"><tt>direct_mask_range_hashing</tt></span></a>, then
<pre>
<a href="linear_probe_fn.html"><span class=
"c2"><tt>linear_probe_fn</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;
</pre>otherwise,
<pre>
<a href="quadratic_probe_fn.html"><span class=
"c2"><tt>quadratic_probe_fn</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Resize_Policy566860465" id=
"Resize_Policy566860465"><b>class</b> Resize_Policy </a>
</pre>
</td>
<td>
<p>Resize policy.</p>
</td>
<td>
If <tt><a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a></tt>
is <tt><a href=
"direct_mask_range_hashing.html"><span class=
"c2"><tt>direct_mask_range_hashing</tt></span></a></tt>,
then
<pre>
<a href="hash_standard_resize_policy.html"><span class=
"c2"><tt>hash_standard_resize_policy</tt></span></a>&lt;
<a href="hash_exponential_size_policy.html"><span class=
"c2"><tt>hash_exponential_size_policy</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;,
<a href="hash_load_check_resize_trigger.html"><span class=
"c2"><tt>hash_load_check_resize_trigger</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;,
<b>false</b>,
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;
</pre>otherwise,
<pre>
<a href="hash_standard_resize_policy.html"><span class=
"c2"><tt>hash_standard_resize_policy</tt></span></a>&lt;
<a href="hash_exponential_size_policy.html"><span class=
"c2"><tt>hash_exponential_size_policy</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;,
<a href="hash_load_check_resize_trigger.html"><span class=
"c2"><tt>hash_load_check_resize_trigger</tt></span></a>&lt;
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;,
<b>false</b>,
<b>typename</b> <a href=
"#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type&gt;
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Store_Hash218262104" id=
"Store_Hash218262104"><b>bool</b> Store_Hash </a>
</pre>
</td>
<td>
<p>Indicates whether the hash value will be stored along
with each key.</p>
<p>If <tt><a href=
"#hash_fn2015995"><tt>hash_fn</tt></a></tt> is <a href=
"null_hash_fn.html"><span class=
"c2"><tt>null_hash_fn</tt></span></a>, then the container
will not compile if this value is
<tt><b>true</b></tt></p>
</td>
<td>
<pre>
<tt><b>false</b></tt>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator </a>
</pre>
</td>
<td>
<p>Allocator type.</p>
</td>
<td>
<pre>
std::allocator&lt;<b>char</b>&gt;
</pre>
</td>
</tr>
</table>
<h2><a name="link2" id="link2">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="basic_hash_table.html"><span class=
"c2"><tt>basic_hash_table</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Types and
Constants</a></h2>
<h3><a name="link4" id="link4">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="hash_fn2015995" id="hash_fn2015995">hash_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a>
</pre>
</td>
<td>
<p>Hash functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="eq_fn80245" id="eq_fn80245">eq_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Eq_Fn60085"><tt>Eq_Fn</tt></a>
</pre>
</td>
<td>
<p>Equivalence functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="comb_probe_fn828996423" id=
"comb_probe_fn828996423">comb_probe_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>
</pre>
</td>
<td>
<p>Combining probe functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="probe_fn10954995" id="probe_fn10954995">probe_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Probe_Fn8454835"><tt>Probe_Fn</tt></a>
</pre>
</td>
<td>
<p>Probe functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="resize_policy4084493169" id=
"resize_policy4084493169">resize_policy</a>
</pre>
</td>
<td>
<pre>
<a href="#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
</pre>
</td>
<td>
<p>Resize policy type.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Public Methods</a></h2>
<h3><a name="link6" id="link6">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
()
</pre>
</td>
<td>
<p>Default constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, and <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;r_comb_probe_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, and <span class=
"c1"><tt>r_comb_probe_fn</tt></span> will be copied by
the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;r_comb_probe_fn,
<b>const</b> <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> &amp;r_probe_fn)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, <span class=
"c1"><tt>r_comb_probe_fn</tt></span> will be copied by
the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object of the container object, and <span class=
"c1"><tt>r_probe_fn</tt></span> will be copied by the
<a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
(<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;r_comb_probe_fn,
<b>const</b> <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> &amp;r_probe_fn,
<b>const</b> <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a> &amp;r_resize_policy)
</pre>
</td>
<td>
<p>Constructor taking some policy objects. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, <span class=
"c1"><tt>r_comb_probe_fn</tt></span> will be copied by
the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object of the container object, <span class=
"c1"><tt>r_probe_fn</tt></span> will be copied by the
<a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
of the container object, and <span class=
"c1"><tt>r_resize_policy</tt></span> will be copied by
the <a href=
"#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
gp_hash_table
(It first_it,
It last_it)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of
value_types. The value_types between <span class=
"c1"><tt>first_it</tt></span> and <span class=
"c1"><tt>last_it</tt></span> will be inserted into the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
gp_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects. The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
gp_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects. The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, and <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
gp_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;r_comb_probe_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects. The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, and <span class=
"c1"><tt>r_comb_probe_fn</tt></span> will be copied by
the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
gp_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;r_comb_probe_fn,
<b>const</b> <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> &amp;r_probe_fn)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects. The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, <span class=
"c1"><tt>r_comb_probe_fn</tt></span> will be copied by
the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object of the container object, and <span class=
"c1"><tt>r_probe_fn</tt></span> will be copied by the
<a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
gp_hash_table
(It first_it,
It last_it,
<b>const</b> <a href=
"#hash_fn2015995"><tt>hash_fn</tt></a> &amp;r_hash_fn,
<b>const</b> <a href=
"#eq_fn80245"><tt>eq_fn</tt></a> &amp;r_eq_fn,
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;r_comb_probe_fn,
<b>const</b> <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> &amp;r_probe_fn,
<b>const</b> <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a> &amp;r_resize_policy)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of value_types
and some policy objects. The value_types between
<span class="c1"><tt>first_it</tt></span> and
<span class="c1"><tt>last_it</tt></span> will be inserted
into the container object. <span class=
"c1"><tt>r_hash_fn</tt></span> will be copied by the
<a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
the container object, <span class=
"c1"><tt>r_eq_fn</tt></span> will be copied by the
<a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
container object, <span class=
"c1"><tt>r_comb_probe_fn</tt></span> will be copied by
the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object of the container object, <span class=
"c1"><tt>r_probe_fn</tt></span> will be copied by the
<a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
of the container object, and <span class=
"c1"><tt>r_resize_policy</tt></span> will be copied by
the <a href=
"#resize_policy4084493169"><tt>resize_policy</tt></a>
object of the container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
gp_hash_table
(<b>const</b> <span class=
"c2"><tt>gp_hash_table</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Copy constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~gp_hash_table
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<span class="c2"><tt>gp_hash_table</tt></span> &amp;
<b>operator</b>=
(<b>const</b> <span class=
"c2"><tt>gp_hash_table</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Assignment operator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>gp_hash_table</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h3><a name="link7" id="link7">Policy Access Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;
get_comb_probe_fn
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &amp;
get_comb_probe_fn
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#probe_fn10954995"><tt>probe_fn</tt></a> &amp;
get_probe_fn
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> &amp;
get_probe_fn
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#probe_fn10954995"><tt>probe_fn</tt></a> object.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>gp_hash_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>gp_hash_tag</tt> Interface</h1>
<p>General-probing hash data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="basic_hash_tag.html"><span class=
"c2"><tt>basic_hash_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,835 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Hash-Based Containers</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash Table Design</h1>
<h2><a name="overview" id="overview">Overview</a></h2>
<p>The collision-chaining hash-based container has the
following declaration.</p>
<pre>
<b>template</b>&lt;
<b>typename</b> Key,
<b>typename</b> Mapped,
<b>typename</b> Hash_Fn = std::hash&lt;Key&gt;,
<b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
<b>typename</b> Comb_Hash_Fn = <a href=
"direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
<b>typename</b> Resize_Policy = <i>default explained below.</i>
<b>bool</b> Store_Hash = <b>false</b>,
<b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
<b>class</b> <a href=
"cc_hash_table.html">cc_hash_table</a>;
</pre>
<p>The parameters have the following meaning:</p>
<ol>
<li><tt>Key</tt> is the key type.</li>
<li><tt>Mapped</tt> is the mapped-policy, and is explained in
<a href="tutorial.html#assoc_ms">Tutorial::Associative
Containers::Associative Containers Others than Maps</a>.</li>
<li><tt>Hash_Fn</tt> is a key hashing functor.</li>
<li><tt>Eq_Fn</tt> is a key equivalence functor.</li>
<li><tt>Comb_Hash_Fn</tt> is a <i>range-hashing_functor</i>;
it describes how to translate hash values into positions
within the table. This is described in <a href=
"#hash_policies">Hash Policies</a>.</li>
<li><tt>Resize_Policy</tt> describes how a container object
should change its internal size. This is described in
<a href="#resize_policies">Resize Policies</a>.</li>
<li><tt>Store_Hash</tt> indicates whether the hash value
should be stored with each entry. This is described in
<a href="#policy_interaction">Policy Interaction</a>.</li>
<li><tt>Allocator</tt> is an allocator
type.</li>
</ol>
<p>The probing hash-based container has the following
declaration.</p>
<pre>
<b>template</b>&lt;
<b>typename</b> Key,
<b>typename</b> Mapped,
<b>typename</b> Hash_Fn = std::hash&lt;Key&gt;,
<b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
<b>typename</b> Comb_Probe_Fn = <a href=
"direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
<b>typename</b> Probe_Fn = <i>default explained below.</i>
<b>typename</b> Resize_Policy = <i>default explained below.</i>
<b>bool</b> Store_Hash = <b>false</b>,
<b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
<b>class</b> <a href=
"gp_hash_table.html">gp_hash_table</a>;
</pre>
<p>The parameters are identical to those of the
collision-chaining container, except for the following.</p>
<ol>
<li><tt>Comb_Probe_Fn</tt> describes how to transform a probe
sequence into a sequence of positions within the table.</li>
<li><tt>Probe_Fn</tt> describes a probe sequence policy.</li>
</ol>
<p>Some of the default template values depend on the values of
other parameters, and are explained in <a href=
"#policy_interaction">Policy Interaction</a>.</p>
<h2><a name="hash_policies" id="hash_policies">Hash
Policies</a></h2>
<h3><a name="general_terms" id="general_terms">General
Terms</a></h3>
<p>Following is an explanation of some functions which hashing
involves. Figure <a href=
"#hash_ranged_hash_range_hashing_fns">Hash functions,
ranged-hash functions, and range-hashing functions</a>)
illustrates the discussion.</p>
<h6 class="c1"><a name="hash_ranged_hash_range_hashing_fns" id=
"hash_ranged_hash_range_hashing_fns"><img src=
"hash_ranged_hash_range_hashing_fns.png" alt=
"no image" /></a></h6>
<h6 class="c1">Hash functions, ranged-hash functions, and
range-hashing functions.</h6>
<p>Let <i>U</i> be a domain (<i>e.g.</i>, the integers, or the
strings of 3 characters). A hash-table algorithm needs to map
elements of <i>U</i> "uniformly" into the range <i>[0,..., m -
1]</i> (where <i>m</i> is a non-negative integral value, and
is, in general, time varying). <i>I.e.</i>, the algorithm needs
a <i>ranged-hash</i> function</p>
<p><i>f : U &times; Z<sub>+</sub> &rarr; Z<sub>+</sub></i>
,</p>
<p>such that for any <i>u</i> in <i>U</i> ,</p>
<p><i>0 &le; f(u, m) &le; m - 1</i> ,</p>
<p>and which has "good uniformity" properties [<a href=
"references.html#knuth98sorting">knuth98sorting</a>]. One
common solution is to use the composition of the hash
function</p>
<p><i>h : U &rarr; Z<sub>+</sub></i> ,</p>
<p>which maps elements of <i>U</i> into the non-negative
integrals, and</p>
<p class="c2">g : Z<sub>+</sub> &times; Z<sub>+</sub> &rarr;
Z<sub>+</sub>,</p>
<p>which maps a non-negative hash value, and a non-negative
range upper-bound into a non-negative integral in the range
between 0 (inclusive) and the range upper bound (exclusive),
<i>i.e.</i>, for any <i>r</i> in <i>Z<sub>+</sub></i>,</p>
<p><i>0 &le; g(r, m) &le; m - 1</i> .</p>
<p>The resulting ranged-hash function, is</p>
<p><i><a name="ranged_hash_composed_of_hash_and_range_hashing"
id="ranged_hash_composed_of_hash_and_range_hashing">f(u , m) =
g(h(u), m)</a></i> (1) .</p>
<p>From the above, it is obvious that given <i>g</i> and
<i>h</i>, <i>f</i> can always be composed (however the converse
is not true). The STL's hash-based containers allow specifying
a hash function, and use a hard-wired range-hashing function;
the ranged-hash function is implicitly composed.</p>
<p>The above describes the case where a key is to be mapped
into a <i>single position</i> within a hash table, <i>e.g.</i>,
in a collision-chaining table. In other cases, a key is to be
mapped into a <i>sequence of positions</i> within a table,
<i>e.g.</i>, in a probing table. Similar terms apply in this
case: the table requires a <i>ranged probe</i> function,
mapping a key into a sequence of positions withing the table.
This is typically achieved by composing a <i>hash function</i>
mapping the key into a non-negative integral type, a
<i>probe</i> function transforming the hash value into a
sequence of hash values, and a <i>range-hashing</i> function
transforming the sequence of hash values into a sequence of
positions.</p>
<h3><a name="range_hashing_fns" id=
"range_hashing_fns">Range-Hashing Functions</a></h3>
<p>Some common choices for range-hashing functions are the
division, multiplication, and middle-square methods [<a href=
"references.html#knuth98sorting">knuth98sorting</a>], defined
as</p>
<p><i><a name="division_method" id="division_method">g(r, m) =
r mod m</a></i> (2) ,</p>
<p><i>g(r, m) = &lceil; u/v ( a r mod v ) &rceil;</i> ,</p>
<p>and</p>
<p><i>g(r, m) = &lceil; u/v ( r<sup>2</sup> mod v ) &rceil;</i>
,</p>
<p>respectively, for some positive integrals <i>u</i> and
<i>v</i> (typically powers of 2), and some <i>a</i>. Each of
these range-hashing functions works best for some different
setting.</p>
<p>The division method <a href="#division_method">(2)</a> is a
very common choice. However, even this single method can be
implemented in two very different ways. It is possible to
implement <a href="#division_method">(2)</a> using the low
level <i>%</i> (modulo) operation (for any <i>m</i>), or the
low level <i>&amp;</i> (bit-mask) operation (for the case where
<i>m</i> is a power of 2), <i>i.e.</i>,</p>
<p><i><a name="division_method_prime_mod" id=
"division_method_prime_mod">g(r, m) = r % m</a></i> (3) ,</p>
<p>and</p>
<p><i><a name="division_method_bit_mask" id=
"division_method_bit_mask">g(r, m) = r &amp; m - 1, (m =
2<sup>k</sup>)</a></i> for some <i>k)</i> (4),</p>
<p>respectively.</p>
<p>The <i>%</i> (modulo) implementation <a href=
"#division_method_prime_mod">(3)</a> has the advantage that for
<i>m</i> a prime far from a power of 2, <i>g(r, m)</i> is
affected by all the bits of <i>r</i> (minimizing the chance of
collision). It has the disadvantage of using the costly modulo
operation. This method is hard-wired into SGI's implementation
[<a href="references.html#sgi_stl">sgi_stl</a>].</p>
<p>The <i>&amp;</i> (bit-mask) implementation <a href=
"#division_method_bit_mask">(4)</a> has the advantage of
relying on the fast bit-wise and operation. It has the
disadvantage that for <i>g(r, m)</i> is affected only by the
low order bits of <i>r</i>. This method is hard-wired into
Dinkumware's implementation [<a href=
"references.html#dinkumware_stl">dinkumware_stl</a>].</p>
<h3><a name="hash_policies_ranged_hash_policies" id=
"hash_policies_ranged_hash_policies">Ranged-Hash
Functions</a></h3>
<p>In cases it is beneficial to allow the
client to directly specify a ranged-hash hash function. It is
true, that the writer of the ranged-hash function cannot rely
on the values of <i>m</i> having specific numerical properties
suitable for hashing (in the sense used in [<a href=
"references.html#knuth98sorting">knuth98sorting</a>]), since
the values of <i>m</i> are determined by a resize policy with
possibly orthogonal considerations.</p>
<p>There are two cases where a ranged-hash function can be
superior. The firs is when using perfect hashing [<a href=
"references.html#knuth98sorting">knuth98sorting</a>]; the
second is when the values of <i>m</i> can be used to estimate
the "general" number of distinct values required. This is
described in the following.</p>
<p>Let</p>
<p class="c2">s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>]</p>
<p>be a string of <i>t</i> characters, each of which is from
domain <i>S</i>. Consider the following ranged-hash
function:</p>
<p><a name="total_string_dna_hash" id=
"total_string_dna_hash"><i>f<sub>1</sub>(s, m) = &sum; <sub>i =
0</sub><sup>t - 1</sup> s<sub>i</sub> a<sup>i</sup></i> mod
<i>m</i></a> (5) ,</p>
<p>where <i>a</i> is some non-negative integral value. This is
the standard string-hashing function used in SGI's
implementation (with <i>a = 5</i>) [<a href=
"references.html#sgi_stl">sgi_stl</a>]. Its advantage is that
it takes into account all of the characters of the string.</p>
<p>Now assume that <i>s</i> is the string representation of a
of a long DNA sequence (and so <i>S = {'A', 'C', 'G',
'T'}</i>). In this case, scanning the entire string might be
prohibitively expensive. A possible alternative might be to use
only the first <i>k</i> characters of the string, where</p>
<p>|S|<sup>k</sup> &ge; m ,</p>
<p><i>i.e.</i>, using the hash function</p>
<p><a name="only_k_string_dna_hash" id=
"only_k_string_dna_hash"><i>f<sub>2</sub>(s, m) = &sum; <sub>i
= 0</sub><sup>k - 1</sup> s<sub>i</sub> a<sup>i</sup></i> mod
<i>m</i></a> , (6)</p>
<p>requiring scanning over only</p>
<p><i>k =</i> log<i><sub>4</sub>( m )</i></p>
<p>characters.</p>
<p>Other more elaborate hash-functions might scan <i>k</i>
characters starting at a random position (determined at each
resize), or scanning <i>k</i> random positions (determined at
each resize), <i>i.e.</i>, using</p>
<p><i>f<sub>3</sub>(s, m) = &sum; <sub>i =
r</sub>0</i><sup>r<sub>0</sub> + k - 1</sup> s<sub>i</sub>
a<sup>i</sup> mod <i>m</i> ,</p>
<p>or</p>
<p><i>f<sub>4</sub>(s, m) = &sum; <sub>i = 0</sub><sup>k -
1</sup> s<sub>r</sub>i</i> a<sup>r<sub>i</sub></sup> mod
<i>m</i> ,</p>
<p>respectively, for <i>r<sub>0</sub>,..., r<sub>k-1</sub></i>
each in the (inclusive) range <i>[0,...,t-1]</i>.</p>
<p>It should be noted that the above functions cannot be
decomposed as <a href=
"#ranged_hash_composed_of_hash_and_range_hashing">(1)</a> .</p>
<h3><a name="pb_ds_imp" id="pb_ds_imp">Implementation</a></h3>
<p>This sub-subsection describes the implementation of the
above in <tt>pb_ds</tt>. It first explains range-hashing
functions in collision-chaining tables, then ranged-hash
functions in collision-chaining tables, then probing-based
tables, and, finally, lists the relevant classes in
<tt>pb_ds</tt>.</p>
<h4>Range-Hashing and Ranged-Hashes in Collision-Chaining
Tables</h4>
<p><a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a> is
parametrized by <tt>Hash_Fn</tt> and <tt>Comb_Hash_Fn</tt>, a
hash functor and a combining hash functor, respectively.</p>
<p>In general, <tt>Comb_Hash_Fn</tt> is considered a
range-hashing functor. <a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a>
synthesizes a ranged-hash function from <tt>Hash_Fn</tt> and
<tt>Comb_Hash_Fn</tt> (see <a href=
"#ranged_hash_composed_of_hash_and_range_hashing">(1)</a>
above). Figure <a href="#hash_range_hashing_seq_diagram">Insert
hash sequence diagram</a> shows an <tt>insert</tt> sequence
diagram for this case. The user inserts an element (point A),
the container transforms the key into a non-negative integral
using the hash functor (points B and C), and transforms the
result into a position using the combining functor (points D
and E).</p>
<h6 class="c1"><a name="hash_range_hashing_seq_diagram" id=
"hash_range_hashing_seq_diagram"><img src=
"hash_range_hashing_seq_diagram.png" alt="no image" /></a></h6>
<h6 class="c1">Insert hash sequence diagram.</h6>
<p>If <a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a>'s
hash-functor, <tt>Hash_Fn</tt> is instantiated by <a href=
"null_hash_fn.html"><tt>null_hash_fn</tt></a> (see <a href=
"concepts.html#concepts_null_policies">Interface::Concepts::Null
Policy Classes</a>), then <tt>Comb_Hash_Fn</tt> is taken to be
a ranged-hash function. Figure <a href=
"#hash_range_hashing_seq_diagram2">Insert hash sequence diagram
with a null hash policy</a> shows an <tt>insert</tt> sequence
diagram. The user inserts an element (point A), the container
transforms the key into a position using the combining functor
(points B and C).</p>
<h6 class="c1"><a name="hash_range_hashing_seq_diagram2" id=
"hash_range_hashing_seq_diagram2"><img src=
"hash_range_hashing_seq_diagram2.png" alt=
"no image" /></a></h6>
<h6 class="c1">Insert hash sequence diagram with a null hash
policy.</h6>
<h4>Probing Tables</h4>
<p><a href=
"gp_hash_table.html"></a><tt>gp_hash_table</tt> is
parametrized by <tt>Hash_Fn</tt>, <tt>Probe_Fn</tt>, and
<tt>Comb_Probe_Fn</tt>. As before, if <tt>Hash_Fn</tt> and
<tt>Probe_Fn</tt> are, respectively, <a href=
"null_hash_fn.html"><tt>null_hash_fn</tt></a> and <a href=
"null_probe_fn.html"><tt>null_probe_fn</tt></a>, then
<tt>Comb_Probe_Fn</tt> is a ranged-probe functor. Otherwise,
<tt>Hash_Fn</tt> is a hash functor, <tt>Probe_Fn</tt> is a
functor for offsets from a hash value, and
<tt>Comb_Probe_Fn</tt> transforms a probe sequence into a
sequence of positions within the table.</p>
<h4>Pre-Defined Policies</h4>
<p><tt>pb_ds</tt> contains some pre-defined classes
implementing range-hashing and probing functions:</p>
<ol>
<li><a href=
"direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
and <a href=
"direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
are range-hashing functions based on a bit-mask and a modulo
operation, respectively.</li>
<li><a href=
"linear_probe_fn.html"><tt>linear_probe_fn</tt></a>, and
<a href=
"quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a> are
a linear probe and a quadratic probe function,
respectively.</li>
</ol>Figure <a href="#hash_policy_cd">Hash policy class
diagram</a> shows a class diagram.
<h6 class="c1"><a name="hash_policy_cd" id=
"hash_policy_cd"><img src="hash_policy_cd.png" alt=
"no image" /></a></h6>
<h6 class="c1">Hash policy class diagram.</h6>
<h2><a name="resize_policies" id="resize_policies">Resize
Policies</a></h2>
<h3><a name="general" id="general">General Terms</a></h3>
<p>Hash-tables, as opposed to trees, do not naturally grow or
shrink. It is necessary to specify policies to determine how
and when a hash table should change its size. Usually, resize
policies can be decomposed into orthogonal policies:</p>
<ol>
<li>A <i>size policy</i> indicating <i>how</i> a hash table
should grow (<i>e.g.,</i> it should multiply by powers of
2).</li>
<li>A <i>trigger policy</i> indicating <i>when</i> a hash
table should grow (<i>e.g.,</i> a load factor is
exceeded).</li>
</ol>
<h3><a name="size_policies" id="size_policies">Size
Policies</a></h3>
<p>Size policies determine how a hash table changes size. These
policies are simple, and there are relatively few sensible
options. An exponential-size policy (with the initial size and
growth factors both powers of 2) works well with a mask-based
range-hashing function (see <a href=
"#hash_policies">Range-Hashing Policies</a>), and is the
hard-wired policy used by Dinkumware [<a href=
"references.html#dinkumware_stl">dinkumware_stl</a>]. A
prime-list based policy works well with a modulo-prime range
hashing function (see <a href="#hash_policies">Range-Hashing
Policies</a>), and is the hard-wired policy used by SGI's
implementation [<a href=
"references.html#sgi_stl">sgi_stl</a>].</p>
<h3><a name="trigger_policies" id="trigger_policies">Trigger
Policies</a></h3>
<p>Trigger policies determine when a hash table changes size.
Following is a description of two policies: <i>load-check</i>
policies, and collision-check policies.</p>
<p>Load-check policies are straightforward. The user specifies
two factors, <i>&alpha;<sub>min</sub></i> and
<i>&alpha;<sub>max</sub></i>, and the hash table maintains the
invariant that</p>
<p><i><a name="load_factor_min_max" id=
"load_factor_min_max">&alpha;<sub>min</sub> &le; (number of
stored elements) / (hash-table size) &le;
&alpha;<sub>max</sub></a></i> (1) .</p>
<p>Collision-check policies work in the opposite direction of
load-check policies. They focus on keeping the number of
collisions moderate and hoping that the size of the table will
not grow very large, instead of keeping a moderate load-factor
and hoping that the number of collisions will be small. A
maximal collision-check policy resizes when the longest
probe-sequence grows too large.</p>
<p>Consider Figure <a href="#balls_and_bins">Balls and
bins</a>. Let the size of the hash table be denoted by
<i>m</i>, the length of a probe sequence be denoted by
<i>k</i>, and some load factor be denoted by &alpha;. We would
like to calculate the minimal length of <i>k</i>, such that if
there were <i>&alpha; m</i> elements in the hash table, a probe
sequence of length <i>k</i> would be found with probability at
most <i>1/m</i>.</p>
<h6 class="c1"><a name="balls_and_bins" id=
"balls_and_bins"><img src="balls_and_bins.png" alt=
"no image" /></a></h6>
<h6 class="c1">Balls and bins.</h6>
<p>Denote the probability that a probe sequence of length
<i>k</i> appears in bin <i>i</i> by <i>p<sub>i</sub></i>, the
length of the probe sequence of bin <i>i</i> by
<i>l<sub>i</sub></i>, and assume uniform distribution. Then</p>
<p><a name="prob_of_p1" id=
"prob_of_p1"><i>p<sub>1</sub></i></a> = (3)</p>
<p class="c2"><b>P</b>(l<sub>1</sub> &ge; k) =</p>
<p><i><b>P</b>(l<sub>1</sub> &ge; &alpha; ( 1 + k / &alpha; - 1
) &le;</i> (a)</p>
<p><i>e ^ ( - ( &alpha; ( k / &alpha; - 1 )<sup>2</sup> ) /2
)</i> ,</p>
<p>where (a) follows from the Chernoff bound [<a href=
"references.html#motwani95random">motwani95random</a>]. To
calculate the probability that <i>some</i> bin contains a probe
sequence greater than <i>k</i>, we note that the
<i>l<sub>i</sub></i> are negatively-dependent [<a href=
"references.html#dubhashi98neg">dubhashi98neg</a>]. Let
<i><b>I</b>(.)</i> denote the indicator function. Then</p>
<p><a name="at_least_k_i_n_some_bin" id=
"at_least_k_i_n_some_bin"><i><b>P</b>( exists<sub>i</sub>
l<sub>i</sub> &ge; k ) =</i> (3)</a></p>
<p class="c2"><b>P</b> ( &sum; <sub>i = 1</sub><sup>m</sup>
<b>I</b>(l<sub>i</sub> &ge; k) &ge; 1 ) =</p>
<p><i><b>P</b> ( &sum; <sub>i = 1</sub><sup>m</sup> <b>I</b> (
l<sub>i</sub> &ge; k ) &ge; m p<sub>1</sub> ( 1 + 1 / (m
p<sub>1</sub>) - 1 ) ) &le;</i> (a)</p>
<p class="c2">e ^ ( ( - m p<sub>1</sub> ( 1 / (m p<sub>1</sub>)
- 1 ) <sup>2</sup> ) / 2 ) ,</p>
<p>where (a) follows from the fact that the Chernoff bound can
be applied to negatively-dependent variables [<a href=
"references.html#dubhashi98neg">dubhashi98neg</a>]. Inserting
<a href="#prob_of_p1">(2)</a> into <a href=
"#at_least_k_i_n_some_bin">(3)</a>, and equating with
<i>1/m</i>, we obtain</p>
<p><i>k ~ &radic; ( 2 &alpha;</i> ln <i>2 m</i> ln<i>(m) )
)</i> .</p>
<h3><a name="imp_pb_ds" id="imp_pb_ds">Implementation</a></h3>
<p>This sub-subsection describes the implementation of the
above in <tt>pb_ds</tt>. It first describes resize policies and
their decomposition into trigger and size policies, then
describes pre-defined classes, and finally discusses controlled
access the policies' internals.</p>
<h4>Resize Policies and Their Decomposition</h4>
<p>Each hash-based container is parametrized by a
<tt>Resize_Policy</tt> parameter; the container derives
<tt><b>public</b></tt>ly from <tt>Resize_Policy</tt>. For
example:</p>
<pre>
<a href="cc_hash_table.html">cc_hash_table</a>&lt;
<b>typename</b> Key,
<b>typename</b> Mapped,
...
<b>typename</b> Resize_Policy
...&gt; :
<b>public</b> Resize_Policy
</pre>
<p>As a container object is modified, it continuously notifies
its <tt>Resize_Policy</tt> base of internal changes
(<i>e.g.</i>, collisions encountered and elements being
inserted). It queries its <tt>Resize_Policy</tt> base whether
it needs to be resized, and if so, to what size.</p>
<p>Figure <a href="#insert_resize_sequence_diagram1">Insert
resize sequence diagram</a> shows a (possible) sequence diagram
of an insert operation. The user inserts an element; the hash
table notifies its resize policy that a search has started
(point A); in this case, a single collision is encountered -
the table notifies its resize policy of this (point B); the
container finally notifies its resize policy that the search
has ended (point C); it then queries its resize policy whether
a resize is needed, and if so, what is the new size (points D
to G); following the resize, it notifies the policy that a
resize has completed (point H); finally, the element is
inserted, and the policy notified (point I).</p>
<h6 class="c1"><a name="insert_resize_sequence_diagram1" id=
"insert_resize_sequence_diagram1"><img src=
"insert_resize_sequence_diagram1.png" alt=
"no image" /></a></h6>
<h6 class="c1">Insert resize sequence diagram.</h6>
<p>In practice, a resize policy can be usually orthogonally
decomposed to a size policy and a trigger policy. Consequently,
the library contains a single class for instantiating a resize
policy: <a href=
"hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
is parametrized by <tt>Size_Policy</tt> and
<tt>Trigger_Policy</tt>, derives <tt><b>public</b></tt>ly from
both, and acts as a standard delegate [<a href=
"references.html#gamma95designpatterns">gamma95designpatterns</a>]
to these policies.</p>
<p>Figures <a href="#insert_resize_sequence_diagram2">Standard
resize policy trigger sequence diagram</a> and <a href=
"#insert_resize_sequence_diagram3">Standard resize policy size
sequence diagram</a> show sequence diagrams illustrating the
interaction between the standard resize policy and its trigger
and size policies, respectively.</p>
<h6 class="c1"><a name="insert_resize_sequence_diagram2" id=
"insert_resize_sequence_diagram2"><img src=
"insert_resize_sequence_diagram2.png" alt=
"no image" /></a></h6>
<h6 class="c1">Standard resize policy trigger sequence
diagram.</h6>
<h6 class="c1"><a name="insert_resize_sequence_diagram3" id=
"insert_resize_sequence_diagram3"><img src=
"insert_resize_sequence_diagram3.png" alt=
"no image" /></a></h6>
<h6 class="c1">Standard resize policy size sequence
diagram.</h6>
<h4>Pre-Defined Policies</h4>
<p>The library includes the following
instantiations of size and trigger policies:</p>
<ol>
<li><a href=
"hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
implements a load check trigger policy.</li>
<li><a href=
"cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
implements a collision check trigger policy.</li>
<li><a href=
"hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
implements an exponential-size policy (which should be used
with mask range hashing).</li>
<li><a href=
"hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
implementing a size policy based on a sequence of primes
[<a href="references.html#sgi_stl">sgi_stl</a>] (which should
be used with mod range hashing</li>
</ol>
<p>Figure <a href="#resize_policy_cd">Resize policy class
diagram</a> gives an overall picture of the resize-related
classes. <a href=
"basic_hash_table.html"><tt>basic_hash_table</tt></a>
is parametrized by <tt>Resize_Policy</tt>, which it subclasses
publicly. This class is currently instantiated only by <a href=
"hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>.
<a href=
"hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
itself is parametrized by <tt>Trigger_Policy</tt> and
<tt>Size_Policy</tt>. Currently, <tt>Trigger_Policy</tt> is
instantiated by <a href=
"hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>,
or <a href=
"cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>;
<tt>Size_Policy</tt> is instantiated by <a href=
"hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>,
or <a href=
"hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>.</p>
<h6 class="c1"><a name="resize_policy_cd" id=
"resize_policy_cd"><img src="resize_policy_cd.png" alt=
"no image" /></a></h6>
<h6 class="c1">Resize policy class diagram.</h6>
<h4>Controlled Access to Policies' Internals</h4>
<p>There are cases where (controlled) access to resize
policies' internals is beneficial. <i>E.g.</i>, it is sometimes
useful to query a hash-table for the table's actual size (as
opposed to its <tt>size()</tt> - the number of values it
currently holds); it is sometimes useful to set a table's
initial size, externally resize it, or change load factors.</p>
<p>Clearly, supporting such methods both decreases the
encapsulation of hash-based containers, and increases the
diversity between different associative-containers' interfaces.
Conversely, omitting such methods can decrease containers'
flexibility.</p>
<p>In order to avoid, to the extent possible, the above
conflict, the hash-based containers themselves do not address
any of these questions; this is deferred to the resize policies,
which are easier to change or replace. Thus, for example,
neither <a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a> nor
<a href=
"gp_hash_table.html"><tt>gp_hash_table</tt></a>
contain methods for querying the actual size of the table; this
is deferred to <a href=
"hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>.</p>
<p>Furthermore, the policies themselves are parametrized by
template arguments that determine the methods they support
([<a href=
"references.html#alexandrescu01modern">alexandrescu01modern</a>]
shows techniques for doing so). <a href=
"hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
is parametrized by <tt>External_Size_Access</tt> that
determines whether it supports methods for querying the actual
size of the table or resizing it. <a href=
"hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
is parametrized by <tt>External_Load_Access</tt> that
determines whether it supports methods for querying or
modifying the loads. <a href=
"cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
is parametrized by <tt>External_Load_Access</tt> that
determines whether it supports methods for querying the
load.</p>
<p>Some operations, for example, resizing a container at
run time, or changing the load factors of a load-check trigger
policy, require the container itself to resize. As mentioned
above, the hash-based containers themselves do not contain
these types of methods, only their resize policies.
Consequently, there must be some mechanism for a resize policy
to manipulate the hash-based container. As the hash-based
container is a subclass of the resize policy, this is done
through virtual methods. Each hash-based container has a
<tt><b>private</b></tt> <tt><b>virtual</b></tt> method:</p>
<pre>
<b>virtual void</b>
do_resize
(size_type new_size);
</pre>
<p>which resizes the container. Implementations of
<tt>Resize_Policy</tt> can export public methods for resizing
the container externally; these methods internally call
<tt>do_resize</tt> to resize the table.</p>
<h2><a name="policy_interaction" id="policy_interaction">Policy
Interaction</a></h2>
<p>Hash-tables are unfortunately especially susceptible to
choice of policies. One of the more complicated aspects of this
is that poor combinations of good policies can form a poor
container. Following are some considerations.</p>
<h3><a name="policy_interaction_probe_size_trigger" id=
"policy_interaction_probe_size_trigger">Probe Policies, Size
Policies, and Trigger Policies</a></h3>
<p>Some combinations do not work well for probing containers.
For example, combining a quadratic probe policy with an
exponential size policy can yield a poor container: when an
element is inserted, a trigger policy might decide that there
is no need to resize, as the table still contains unused
entries; the probe sequence, however, might never reach any of
the unused entries.</p>
<p>Unfortunately, <tt>pb_ds</tt> cannot detect such problems at
compilation (they are halting reducible). It therefore defines
an exception class <a href=
"insert_error.html"><tt>insert_error</tt></a> to throw an
exception in this case.</p>
<h3><a name="policy_interaction_hash_trigger" id=
"policy_interaction_hash_trigger">Hash Policies and Trigger
Policies</a></h3>
<p>Some trigger policies are especially susceptible to poor
hash functions. Suppose, as an extreme case, that the hash
function transforms each key to the same hash value. After some
inserts, a collision detecting policy will always indicate that
the container needs to grow.</p>
<p>The library, therefore, by design, limits each operation to
one resize. For each <tt>insert</tt>, for example, it queries
only once whether a resize is needed.</p>
<h3><a name="policy_interaction_eq_sth_hash" id=
"policy_interaction_eq_sth_hash">Equivalence Functors, Storing
Hash Values, and Hash Functions</a></h3>
<p><a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a> and
<a href=
"gp_hash_table.html"><tt>gp_hash_table</tt></a> are
parametrized by an equivalence functor and by a
<tt>Store_Hash</tt> parameter. If the latter parameter is
<tt><b>true</b></tt>, then the container stores with each entry
a hash value, and uses this value in case of collisions to
determine whether to apply a hash value. This can lower the
cost of collision for some types, but increase the cost of
collisions for other types.</p>
<p>If a ranged-hash function or ranged probe function is
directly supplied, however, then it makes no sense to store the
hash value with each entry. <tt>pb_ds</tt>'s container will
fail at compilation, by design, if this is attempted.</p>
<h3><a name="policy_interaction_size_load_check" id=
"policy_interaction_size_load_check">Size Policies and
Load-Check Trigger Policies</a></h3>
<p>Assume a size policy issues an increasing sequence of sizes
<i>a, a q, a q<sup>1</sup>, a q<sup>2</sup>, ...</i> For
example, an exponential size policy might issue the sequence of
sizes <i>8, 16, 32, 64, ...</i></p>
<p>If a load-check trigger policy is used, with loads
<i>&alpha;<sub>min</sub></i> and <i>&alpha;<sub>max</sub></i>,
respectively, then it is a good idea to have:</p>
<ol>
<li><i>&alpha;<sub>max</sub> ~ 1 / q</i></li>
<li><i>&alpha;<sub>min</sub> &lt; 1 / (2 q)</i></li>
</ol>
<p>This will ensure that the amortized hash cost of each
modifying operation is at most approximately 3.</p>
<p><i>&alpha;<sub>min</sub> ~ &alpha;<sub>max</sub></i> is, in
any case, a bad choice, and <i>&alpha;<sub>min</sub> &gt;
&alpha;<sub>max</sub></i> is horrendous.</p>
</div>
</body>
</html>

View File

@ -1,183 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>hash_exponential_size_policy Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>hash_exponential_size_policy</tt> Interface</h1>
<p>A size policy whose sequence of sizes form an exponential
sequence (typically powers of 2)</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h2><a name="link4" id="link4">Public Methods</a></h2>
<h3><a name="link5" id="link5">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
hash_exponential_size_policy
(<a href=
"#size_type55424436"><tt>size_type</tt></a> start_size = 8,
<a href=
"#size_type55424436"><tt>size_type</tt></a> grow_factor = 2)
</pre>
</td>
<td>
<p>Default constructor, or constructor taking a
<span class="c1"><tt>start_size</tt></span>, or
constructor taking a start size and <span class=
"c1"><tt>grow_factor</tt></span>. The policy will use the
sequence of sizes <span class=
"c1"><tt>start_size</tt></span>, <span class=
"c1"><tt>start_size</tt></span> * <span class=
"c1"><tt>grow_factor</tt></span>, <span class=
"c1"><tt>start_size</tt></span> * <span class=
"c1"><tt>grow_factor</tt></span>^2, ...</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>hash_exponential_size_policy</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h2><a name="link6" id="link6">Protected Methods</a></h2>
<h3><a name="link7" id="link7">Size methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#size_type55424436"><tt>size_type</tt></a>
get_nearest_larger_size
(<a href=
"#size_type55424436"><tt>size_type</tt></a> size) <b>const</b>
</pre>
</td>
<td>
<p>Given a size <span class="c1"><tt>size</tt></span>,
returns a size that is larger.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#size_type55424436"><tt>size_type</tt></a>
get_nearest_smaller_size
(<a href=
"#size_type55424436"><tt>size_type</tt></a> size) <b>const</b>
</pre>
</td>
<td>
<p>Given a size <span class="c1"><tt>size</tt></span>,
returns a size that is smaller.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,583 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>hash_load_check_resize_trigger Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>hash_load_check_resize_trigger</tt> Interface</h1>
<p>A resize trigger policy based on a load check. It keeps the
load factor between some load factors load_min and
load_max.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="External_Load_Access1313998607" id=
"External_Load_Access1313998607"><b>bool</b> External_Load_Access </a>
</pre>
</td>
<td>
<p>Specifies whether the load factor can be accessed
externally. The two options have different trade-offs in
terms of flexibility, genericity, and encapsulation.</p>
</td>
<td><tt><b>false</b></tt></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="external_load_access3976598639" id=
"external_load_access3976598639">external_load_access</a>
</pre>
</td>
<td>
<pre>
<a href=
"#External_Load_Access1313998607"><tt>External_Load_Access</tt></a>
</pre>
</td>
<td>
<p>Indicates whether loads can be accessed externally</p>
</td>
</tr>
</table>
<h2><a name="link4" id="link4">Public Methods</a></h2>
<h3><a name="link5" id="link5">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
hash_load_check_resize_trigger
(float load_min = 0.125,
float load_max = 0.5)
</pre>
</td>
<td>
<p>Default constructor, or constructor taking
<span class="c1"><tt>load_min</tt></span> and
<span class="c1"><tt>load_max</tt></span> load factors
between which this policy will keep the actual load.</p>
<p>It is the responsibility of the user to ensure that
<span class="c1"><tt>load_min</tt></span> is smaller than
<span class="c1"><tt>load_max</tt></span>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class=
"c2"><tt>hash_load_check_resize_trigger</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~hash_load_check_resize_trigger
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
</table>
<h3><a name="link6" id="link6">Load Access Methods</a></h3>
<p>These methods are only available if the external access
parameter is set.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> std::pair&lt;float, float&gt;
get_loads
() <b>const</b>
</pre>
</td>
<td>
<p>Returns a pair of the minimal and maximal loads,
respectively.</p>
<p>Calling this method will not compile when <a href=
"#External_Load_Access1313998607"><tt>External_Load_Access</tt></a>
== <tt><b>false</b></tt>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
set_loads
(std::pair&lt;float, float&gt; load_pair)
</pre>
</td>
<td>
<p>Sets the loads through a pair of the minimal and
maximal loads, respectively.</p>
<p>Calling this method resizes the container, and might
throw an exception. It is the responsibility of the user
to pass appropriate loads to this function. Calling this
method will not compile when <a href=
"#External_Load_Access1313998607"><tt>External_Load_Access</tt></a>
== <tt><b>false</b></tt>.</p>
</td>
</tr>
</table>
<h2><a name="link7" id="link7">Protected Methods</a></h2>
<h3><a name="link8" id="link8">Insert Search
Notifications.</a></h3>
<p>Notifications called during an insert operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link9" id="link9">Find Search
Notifications.</a></h3>
<p>Notifications called during a find operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link10" id="link10">Erase Search
Notifications.</a></h3>
<p>Notifications called during an insert operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link11" id="link11">Content Change
Notifications.</a></h3>
<p>Notifications called when the content of the table changes
in a way that can affect the resize policy.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_inserted
(<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
</pre>
</td>
<td>
<p>Notifies an element was inserted. the total number of
entries in the table is <span class=
"c1"><tt>num_entries</tt></span>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erased
(<a href="#size_type55424436"><tt>size_type</tt></a> num_entries)
</pre>
</td>
<td>
<p>Notifies an element was erased.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_cleared
()
</pre>
</td>
<td>
<p>Notifies the table was cleared.</p>
</td>
</tr>
</table>
<h3><a name="link12" id="link12">Size Change
Notifications.</a></h3>
<p>Notifications called when the table changes size.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_resized
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Notifies the table was resized as a result of this
object's signifying that a resize is needed.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_externally_resized
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Notifies the table was resized externally.</p>
</td>
</tr>
</table>
<h3><a name="link13" id="link13">Queries</a></h3>
<p>Called to query whether/how to resize.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
is_resize_needed
() <b>const</b>
</pre>
</td>
<td>
<p>Queries whether a resize is needed.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
is_grow_needed
(<a href="#size_type55424436"><tt>size_type</tt></a> size,
<a href=
"#size_type55424436"><tt>size_type</tt></a> num_entries) <b>const</b>
</pre>
</td>
<td>
<p>Queries whether a grow is needed.</p>
<p>This method is called only if this object indicated
resize is needed. The actual <span class=
"c1"><tt>size</tt></span> of the table is <span class=
"c1"><tt>size</tt></span>, and the number of entries in
it is <span class="c1"><tt>num_entries</tt></span>.</p>
</td>
</tr>
</table>
<h2><a name="link14" id="link14">Private Methods</a></h2>
<h3><a name="link15" id="link15">Overrides</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b> <b>void</b>
do_resize
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Resizes to <span class=
"c1"><tt>new_size</tt></span>.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,149 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>hash_prime_size_policy Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>hash_prime_size_policy</tt> Interface</h1>
<p>A size policy whose sequence of sizes form a
nearly-exponential sequence of primes.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Public Types and
Constants</a></h2>
<h3><a name="link2" id="link2">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
size_t
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Methods</a></h2>
<h3><a name="link4" id="link4">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
hash_prime_size_policy
(<a href=
"#size_type55424436"><tt>size_type</tt></a> start_size = 8)
</pre>
</td>
<td>
<p>Default constructor, or constructor taking a
<span class="c1"><tt>start_size</tt></span> The policy
will use the sequence of sizes approximately <span class=
"c1"><tt>start_size</tt></span>, <span class=
"c1"><tt>start_size</tt></span> * 2, <span class=
"c1"><tt>start_size</tt></span> * 2^2, ...</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
swap
(<span class=
"c2"><tt>hash_prime_size_policy</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Protected Methods</a></h2>
<h3><a name="link6" id="link6">Size methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#size_type55424436"><tt>size_type</tt></a>
get_nearest_larger_size
(<a href=
"#size_type55424436"><tt>size_type</tt></a> size) <b>const</b>
</pre>
</td>
<td>
<p>Given a size <span class="c1"><tt>size</tt></span>,
returns a size that is larger.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#size_type55424436"><tt>size_type</tt></a>
get_nearest_smaller_size
(<a href=
"#size_type55424436"><tt>size_type</tt></a> size) <b>const</b>
</pre>
</td>
<td>
<p>Given a size <span class="c1"><tt>size</tt></span>,
returns a size that is smaller.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,173 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Tree Text Locality of Reference Timing Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash-Based Erase Memory-Use Test</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of uniform i.i.d. integer keys
into a container, then erases all keys except one. It measures
the final size of the container.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc"><tt>hash_random_int_erase_mem_usage.cc</tt></a>
2000 2000 2100)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test checks how containers adjust internally as their
logical size decreases (see <a href="motivation.html#assoc_ers_methods">Motivation::Associative
Containers::Slightly Different Methods::Methods Related to
Erase</a>).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NHG">NHG</a>, <a href="#NHM">NHM</a> and
<a href="#NHL">NHL</a> show the results for the native and
collision-chaining types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a> and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively.</p>
<div id="NHG_res_div">
<div id="NHG_gcc">
<div id="NHG_hash_random_int_erase_mem_usage_test">
<div id="NHG_assoc">
<div id="NHG_Native_456_collision-chaing_456_and_probing_456_hash_random_int_erase_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="hash_random_int_erase_mem_usage_test_gcc.png" alt="no image" /></a></h6>NHG: Native, collision-chaing, and probing, hash random int erase test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_set_ncah-
<tt>std::tr1::unordered_set</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_set-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHM_res_div">
<div id="NHM_msvc">
<div id="NHM_hash_random_int_erase_mem_usage_test">
<div id="NHM_assoc">
<div id="NHM_Native_456_collision-chaing_456_and_probing_456_hash_random_int_erase_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="hash_random_int_erase_mem_usage_test_msvc.png" alt="no image" /></a></h6>NHM: Native, collision-chaing, and probing, hash random int erase test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_set_ncah-
<tt>stdext::hash_set</tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_set-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHM_res_div">
<div id="NHM_msvc">
<div id="NHM_hash_random_int_erase_mem_usage_test">
<div id="NHM_assoc">
<div id="NHM_Native_456_collision-chaing_456_and_probing_456_hash_random_int_erase_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="hash_random_int_erase_mem_usage_test_msvc.png" alt="no image" /></a></h6>NHM: Native, collision-chaing, and probing, hash random int erase test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_set_ncah-
<tt>stdext::hash_set</tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_set-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHL_res_div">
<div id="NHL_local">
<div id="NHL_hash_random_int_erase_mem_usage_test">
<div id="NHL_assoc">
<div id="NHL_Native_456_collision-chaing_456_and_probing_456_hash_random_int_erase_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="hash_random_int_erase_mem_usage_test_local.png" alt="no image" /></a></h6>NHL: Native, collision-chaing, and probing, hash random int erase test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>STL hash-based containers act very differently than trees in
this respect. When erasing numerous keys from an STL
associative-container, the resulting memory user varies greatly
depending on whether the container is tree-based or hash-based.
As noted in <a href="motivation.html#assoc_methods">Motivation::Choice of
Methods</a> , this is a fundamental consequence of the STL's
associative containers' interface, it is not due to a specific
implementation.</p>
<p>(See <a href="priority_queue_text_pop_mem_usage_test.html">Priority Queue
Text <tt>pop</tt> Memory Use Test</a> for a similar phenomenon
regarding priority queues.)</p>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -1,247 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Hash Random Int Find Timing Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash-Based Random-Integer <tt>find</tt> Find Timing
Test</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of values with uniform i.i.d.
integer keys into a container, then performs a series of finds
using <tt>find</tt>. It measures the average time
for<tt>find</tt> as a function of the number of values
inserted.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/random_int_find_timing.cc"><tt>random_int_find_timing_test</tt></a>
200 200 2100)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test checks the effect of different underlying
hash-tables (see <a href="hash_based_containers.html">Design::Associative
Containers::Associative Containers::Hash-Based Containers</a>),
range-hashing functions, and trigger policies (see <a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a> and
<a href="hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a>).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NCCG">NCCG</a>, <a href="#NCCM">NCCM</a>,
and <a href="#NCCL">NCCL</a> show the results for the native
and collision-chaining types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively; Figures <a href="#NGPG">NGPG</a>, <a href="#NGPM">NGPM</a>, and <a href="#NGPL">NGPL</a> show the results
for the native and probing types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>
respectively.</p>
<div id="NCCG_res_div">
<div id="NCCG_gcc">
<div id="NCCG_cc_hash_random_int_find_timing_test">
<div id="NCCG_assoc">
<div id="NCCG_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCG" id="NCCG"><img src="cc_hash_random_int_find_timing_test_gcc.png" alt="no image" /></a></h6>NCCG: Native and collision-chaining hash random int find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCM_res_div">
<div id="NCCM_msvc">
<div id="NCCM_cc_hash_random_int_find_timing_test">
<div id="NCCM_assoc">
<div id="NCCM_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCM" id="NCCM"><img src="cc_hash_random_int_find_timing_test_msvc.png" alt="no image" /></a></h6>NCCM: Native and collision-chaining hash random int find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCL_res_div">
<div id="NCCL_local">
<div id="NCCL_cc_hash_random_int_find_timing_test">
<div id="NCCL_assoc">
<div id="NCCL_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt_find_455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCL" id= "NCCL"><img src="cc_hash_random_int_find_timing_test_local.png" alt="no image" /></a></h6>NCCL: Native and collision-chaining hash random int find timing test using <tt>find</tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPG_res_div">
<div id="NGPG_gcc">
<div id="NGPG_gp_hash_random_int_find_timing_test">
<div id="NGPG_assoc">
<div id="NGPG_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPG" id="NGPG"><img src="gp_hash_random_int_find_timing_test_gcc.png" alt="no image" /></a></h6>NGPG: Native and collision-chaining hash random int find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPM_res_div">
<div id="NGPM_msvc">
<div id="NGPM_gp_hash_random_int_find_timing_test">
<div id="NGPM_assoc">
<div id="NGPM_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPM" id="NGPM"><img src="gp_hash_random_int_find_timing_test_msvc.png" alt="no image" /></a></h6>NGPM: Native and collision-chaining hash random int find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPL_res_div">
<div id="NGPL_local">
<div id="NGPL_gp_hash_random_int_find_timing_test">
<div id="NGPL_assoc">
<div id="NGPL_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt_find_455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPL" id= "NGPL"><img src="gp_hash_random_int_find_timing_test_local.png" alt="no image" /></a></h6>NGPL: Native and collision-chaining hash random int find timing test using <tt>find</tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>In this setting, the choice of underlying hash-table (see
<a href="hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a> ) affects performance
most, then the range-hashing scheme (See <a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a> ), and,
only finally, other policies.</p>
<p>When comparing Figures <a href="#NCCG">NCCG</a> and <a href="#NCCM">NCCM</a> to <a href="#NGPG">NGPG</a> and <a href="#NGPM">NGPM</a> , respectively, it is apparent that the
probing containers are less efficient than the
collision-chaining containers (both
<tt>std::tr1::unordered_map</tt> and <tt>stdext::hash_map</tt>
use collision-chaining) in this case.</p>
<p>( <a href="hash_random_int_subscript_insert_timing_test.html">Hash-Based
Random-Integer Subscript Insert Timing Test</a> shows a
different case, where the situation is reversed; <a href="assoc_performance_tests.html#hash_based_types">Observations::Hash-Based
Container Types</a> discusses some further considerations.)</p>
<p>Within each type of hash-table, the range-hashing scheme
affects performance more than other policies; <a href="hash_text_find_find_timing_test.html#observations">Hash-Based
Text <tt>find</tt> Find Timing Test::Observations</a> discusses
this. In Figures <a href="#NCCG">NCCG</a> , <a href="#NCCM">NCCM</a> , <a href="#NGPG">NGPG</a> , and <a href="#NGPM">NGPM</a> , it should be noted that
<tt>std::tr1::unordered_map</tt> and <tt>stdext::hash_map</tt>
are hard-wired currently to mod-based and mask-based schemes,
respectively.</p>
<p><a href="assoc_performance_tests.html#hash_based_types">Observations::Hash-Based
Container Types</a> summarizes some observations on hash-based
containers; <a href="assoc_performance_tests.html#hash_based_policies">Observations::Hash-Based
Containers' Policies</a> summarizes some observations on
hash-based containers' policies.</p>
</div>
</body>
</html>

View File

@ -1,220 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Hash Random Int Subscript Find Timing Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash-Based Random-Integer <tt><b>operator</b>[]</tt>
FindTiming Test</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of values with uniform i.i.d.
integer keys into a container, then performs a series of finds
using <tt><b>operator</b>[]</tt>. It measures the average time
for <tt><b>operator</b>[]</tt> as a function of the number of
values inserted.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/random_int_subscript_find_timing.cc"><tt>hash_random_int_subscript_find_timing_test</tt></a>
200 200 2100)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test checks the effect of different underlying
hash-tables (see <a href="hash_based_containers.html">Design::Hash-Based Containers</a>
), range-hashing functions, and trigger policies (see <a href="hash_based_containers.html#hash_policies">Design::Hash-Based
Containers::Hash Policies</a> and <a href="hash_based_containers.html#resize_policies">Design::Hash-Based
Containers::Resize Policies</a> ).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NCCG">NCCG</a>, <a href="#NCCM">NCCM</a>,
and <a href="#NCCL">NCCL</a> show the results for the native
and collision-chaining types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively; Figures <a href="#NGPG">NGPG</a>, <a href="#NGPM">NGPM</a>, and <a href="#NGPL">NGPL</a> show the results
for the native and probing types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively.</p>
<div id="NCCG_res_div">
<div id="NCCG_gcc">
<div id="NCCG_cc_hash_random_int_subscript_timing_test_find">
<div id="NCCG_assoc">
<div id="NCCG_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCG" id="NCCG"><img src="cc_hash_random_int_subscript_timing_test_find_gcc.png" alt="no image" /></a></h6>NCCG: Native and collision-chaining hash random int find timing test using <tt><b>operator</b></tt>[] - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCM_res_div">
<div id="NCCM_msvc">
<div id="NCCM_cc_hash_random_int_subscript_timing_test_find">
<div id="NCCM_assoc">
<div id="NCCM_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCM" id="NCCM"><img src="cc_hash_random_int_subscript_timing_test_find_msvc.png" alt="no image" /></a></h6>NCCM: Native and collision-chaining hash random int find timing test using <tt><b>operator</b></tt>[] - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCL_res_div">
<div id="NCCL_local">
<div id="NCCL_cc_hash_random_int_subscript_timing_test_find">
<div id="NCCL_assoc">
<div id="NCCL_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCL" id= "NCCL"><img src="cc_hash_random_int_subscript_timing_test_find_local.png" alt="no image" /></a></h6>NCCL: Native and collision-chaining hash random int find timing test using <tt><b>operator</b></tt>[] - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPG_res_div">
<div id="NGPG_gcc">
<div id="NGPG_gp_hash_random_int_subscript_timing_test_find">
<div id="NGPG_assoc">
<div id="NGPG_Native_and_probing_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPG" id="NGPG"><img src="gp_hash_random_int_subscript_timing_test_find_gcc.png" alt="no image" /></a></h6>NGPG: Native and probing hash random int find timing test using <tt><b>operator</b></tt>[] - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPM_res_div">
<div id="NGPM_msvc">
<div id="NGPM_gp_hash_random_int_subscript_timing_test_find">
<div id="NGPM_assoc">
<div id="NGPM_Native_and_probing_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPM" id="NGPM"><img src="gp_hash_random_int_subscript_timing_test_find_msvc.png" alt="no image" /></a></h6>NGPM: Native and probing hash random int find timing test using <tt><b>operator</b></tt>[] - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPL_res_div">
<div id="NGPL_local">
<div id="NGPL_gp_hash_random_int_subscript_timing_test_find">
<div id="NGPL_assoc">
<div id="NGPL_Native_and_probing_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPL" id= "NGPL"><img src="gp_hash_random_int_subscript_timing_test_find_local.png" alt="no image" /></a></h6>NGPL: Native and probing hash random int find timing test using <tt><b>operator</b></tt>[] - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>This test shows similar results to <a href="hash_random_int_find_find_timing_test.html">Hash-Based
Random-Integer <tt>find</tt> Find Timing Test</a> .</p>
</div>
</body>
</html>

View File

@ -1,365 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Hash Random Int Subscript Insert Timing Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash-Based Random-Integer <tt><b>operator</b>[]</tt> Insert
Timing Test</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of values with uniform i.i.d.
integer keys into a container, using
<tt><b>operator</b>[]</tt>. It measures the average time for
<tt><b>operator</b>[]</tt> as a function of the number of
values inserted.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc"><tt>hash_random_int_subscript_insert_timing_test</tt></a>
200 200 2100)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test primarily checks the effect of different underlying
hash-tables (see <a href="hash_based_containers.html">Design::Associative
Containers::Associative Containers::Hash-Based
Containers</a>).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NCCG">NCCG</a>, <a href="#NCCM">NCCM</a>,
and <a href="#NCCL">NCCL</a> show the results for the native
and collision-chaining types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively; Figures <a href="#NGPG">NGPG</a>, <a href="#NGPM">NGPM</a>, and <a href="#NGPL">NGPL</a> show the results
for the native and probing types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>
respectively; Figures <a href="#CCGPG">CCGPG</a>, <a href="#CCGPM">CCGPM</a>, and <a href="#CCGPL">CCGPL</a> compare the
results for the collision-chaining and probing types of
<tt>pb_ds</tt> only, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>
respectively.</p>
<div id="NCCG_res_div">
<div id="NCCG_gcc">
<div id="NCCG_cc_hash_random_int_subscript_timing_test_insert">
<div id="NCCG_assoc">
<div id="NCCG_Native_and_collision-chaining_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCG" id="NCCG"><img src="cc_hash_random_int_subscript_timing_test_insert_gcc.png" alt="no image" /></a></h6>NCCG: Native and collision-chaining hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCM_res_div">
<div id="NCCM_msvc">
<div id="NCCM_cc_hash_random_int_subscript_timing_test_insert">
<div id="NCCM_assoc">
<div id="NCCM_Native_and_collision-chaining_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCM" id="NCCM"><img src="cc_hash_random_int_subscript_timing_test_insert_msvc.png" alt="no image" /></a></h6>NCCM: Native and collision-chaining hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCL_res_div">
<div id="NCCL_local">
<div id="NCCL_cc_hash_random_int_subscript_timing_test_insert">
<div id="NCCL_assoc">
<div id="NCCL_Native_and_collision-chaining_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCL" id= "NCCL"><img src="cc_hash_random_int_subscript_timing_test_insert_local.png" alt="no image" /></a></h6>NCCL: Native and collision-chaining hash random int insert timing test using <tt><b>operator</b></tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPG_res_div">
<div id="NGPG_gcc">
<div id="NGPG_gp_hash_random_int_subscript_timing_test_insert">
<div id="NGPG_assoc">
<div id="NGPG_Native_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPG" id="NGPG"><img src="gp_hash_random_int_subscript_timing_test_insert_gcc.png" alt="no image" /></a></h6>NGPG: Native and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPM_res_div">
<div id="NGPM_msvc">
<div id="NGPM_gp_hash_random_int_subscript_timing_test_insert">
<div id="NGPM_assoc">
<div id="NGPM_Native_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPM" id="NGPM"><img src="gp_hash_random_int_subscript_timing_test_insert_msvc.png" alt="no image" /></a></h6>NGPM: Native and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NGPL_res_div">
<div id="NGPL_local">
<div id="NGPL_gp_hash_random_int_subscript_timing_test_insert">
<div id="NGPL_assoc">
<div id="NGPL_Native_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPL" id= "NGPL"><img src="gp_hash_random_int_subscript_timing_test_insert_local.png" alt="no image" /></a></h6>NGPL: Native and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="CCGPG_res_div">
<div id="CCGPG_gcc">
<div id="CCGPG_ccgp_hash_random_int_subscript_timing_test_insert">
<div id="CCGPG_assoc">
<div id="CCGPG_Collision-chaining_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="CCGPG" id="CCGPG"><img src="ccgp_hash_random_int_subscript_timing_test_insert_gcc.png" alt="no image" /></a></h6>CCGPG: Collision-chaining and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="CCGPM_res_div">
<div id="CCGPM_msvc">
<div id="CCGPM_ccgp_hash_random_int_subscript_timing_test_insert">
<div id="CCGPM_assoc">
<div id="CCGPM_Collision-chaining_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="CCGPM" id="CCGPM"><img src="ccgp_hash_random_int_subscript_timing_test_insert_msvc.png" alt="no image" /></a></h6>CCGPM: Collision-chaining and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
</li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="CCGPL_res_div">
<div id="CCGPL_local">
<div id="CCGPL_ccgp_hash_random_int_subscript_timing_test_insert">
<div id="CCGPL_assoc">
<div id="CCGPL_Collision-chaining_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="CCGPL" id= "CCGPL"><img src="ccgp_hash_random_int_subscript_timing_test_insert_local.png" alt="no image" /></a></h6>CCGPL: Collision-chaining and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>In this setting, as in <a href="hash_text_find_find_timing_test.html">Hash-Based Text
<tt>find</tt> Find Timing Test</a> and <a href="hash_random_int_find_find_timing_test.html">Hash-Based
Random-Integer <tt>find</tt> Find Timing Test</a> , the choice
of underlying hash-table underlying hash-table (see <a href="hash_based_containers.html">Design::Associative
Containers::Hash-Based Containers</a> ) affects performance
most, then the range-hashing scheme (See <a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a> ), and,
only finally, other policies.</p>
<p>There are some differences, however:</p>
<ol>
<li>In this setting, probing tables function sometimes more
efficiently than collision-chaining tables (see Figures
<a href="#CCGPG">CCGPG</a> and <a href="#CCGPM">CCGPM</a> ).
This is explained shortly.</li>
<li>The performance graphs have a "saw-tooth" shape. The
average insert time rises and falls. As values are inserted
into the container, the load factor grows larger. Eventually,
a resize occurs. The reallocations and rehashing are
relatively expensive. After this, the load factor is smaller
than before.</li>
</ol>
<p>Collision-chaining containers use indirection for greater
flexibility; probing containers store values contiguously, in
an array (see Figure <a href="motivation.html#different_underlying_data_structures">Motivation::Different
underlying data structures</a> A and B, respectively). It
follows that for simple data types, probing containers access
their allocator less frequently than collision-chaining
containers, (although they still have less efficient probing
sequences). This explains why some probing containers fare
better than collision-chaining containers in this case.</p>
<p>Within each type of hash-table, the range-hashing scheme
affects performance more than other policies. This is similar
to the situation in <a href="hash_text_find_find_timing_test.html">Hash-Based Text
<tt>find</tt> Find Timing Test</a> and <a href="hash_random_int_find_find_timing_test.html">Hash-Based
Random-Integer <tt>find</tt> Find Timing Test</a>.
Unsurprisingly, however, containers with <u>lower</u>
<i>alpha<sub>max</sub></i> perform <u>worse</u> in this case,
since more re-hashes are performed.</p>
<p><a href="assoc_performance_tests.html#hash_based_types">Observations::Hash-Based
Container Types</a> summarizes some observations on hash-based
containers; <a href="assoc_performance_tests.html#hash_based_policies">Observations::Hash-Based
Containers' Policies</a> summarizes some observations on
hash-based containers' policies.</p>
</div>
</body>
</html>

View File

@ -1,795 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>hash_standard_resize_policy Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>hash_standard_resize_policy</tt> Interface</h1>
<p>A resize policy which delegates operations to size and
trigger policies.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Policy1072992366" id=
"Size_Policy1072992366"><b>class</b> Size_Policy </a>
</pre>
</td>
<td>
<p>Size policy type.</p>
</td>
<td><a href=
"hash_exponential_size_policy.html"><span class="c2"><tt>hash_exponential_size_policy</tt></span></a></td>
</tr>
<tr>
<td>
<pre>
<a name="Trigger_Policy3611271815" id=
"Trigger_Policy3611271815"><b>class</b> Trigger_Policy </a>
</pre>
</td>
<td>
<p>Trigger policy type.</p>
</td>
<td><a href=
"hash_load_check_resize_trigger.html"><span class=
"c2"><tt>hash_load_check_resize_trigger</tt></span></a></td>
</tr>
<tr>
<td>
<pre>
<a name="External_Size_Access1380482982" id=
"External_Size_Access1380482982"><b>bool</b> External_Size_Access </a>
</pre>
</td>
<td>
<p>Indicates whether physical sizes can be accessed
externally.</p>
</td>
<td><tt><b>false</b></tt></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Types and
Constants</a></h2>
<h3><a name="link4" id="link4">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h3><a name="link5" id="link5">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="trigger_policy4019166151" id=
"trigger_policy4019166151">trigger_policy</a>
</pre>
</td>
<td>
<pre>
<a href="#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
</pre>
</td>
<td>
<p>Trigger policy type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="size_policy1385592366" id=
"size_policy1385592366">size_policy</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
</pre>
</td>
<td>
<p>Size policy type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="external_size_access4043083014" id=
"external_size_access4043083014">external_size_access</a>
</pre>
</td>
<td>
<pre>
<a href=
"#External_Size_Access1380482982"><tt>External_Size_Access</tt></a>
</pre>
</td>
<td>
<p>Indicates whether sizes can be accessed
externally.</p>
</td>
</tr>
</table>
<h2><a name="link6" id="link6">Public Methods</a></h2>
<h3><a name="link7" id="link7">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
hash_standard_resize_policy
()
</pre>
</td>
<td>
<p>Default constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
hash_standard_resize_policy
(<b>const</b> <a href=
"#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;r_size_policy)
</pre>
</td>
<td>
<p>constructor taking some policies <span class=
"c1"><tt>r_size_policy</tt></span> will be copied by the
<a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
object of this object.</p>
</td>
</tr>
<tr>
<td>
<pre>
hash_standard_resize_policy
(<b>const</b> <a href=
"#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;r_size_policy,
<b>const</b> <a href=
"#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a> &amp;r_trigger_policy)
</pre>
</td>
<td>
<p>constructor taking some policies. <span class=
"c1"><tt>r_size_policy</tt></span> will be copied by the
<a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
object of this object. <span class=
"c1"><tt>r_trigger_policy</tt></span> will be copied by
the <a href=
"#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
object of this object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~hash_standard_resize_policy
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
swap
(<span class=
"c2"><tt>hash_standard_resize_policy</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h3><a name="link8" id="link8">Policy Access Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;
get_size_policy
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#Size_Policy1072992366"><tt>Size_Policy</tt></a> object
used.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;
get_size_policy
() <b>const</b>
</pre>
</td>
<td>
<p>Const access to the <a href=
"#Size_Policy1072992366"><tt>Size_Policy</tt></a> object
used.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href=
"#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a> &amp;
get_trigger_policy
()
</pre>
</td>
<td>
<p>Access to the <a href=
"#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
object used.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>const</b> <a href=
"#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a> &amp;
get_trigger_policy
() <b>const</b>
</pre>
</td>
<td>
<p>Access to the <a href=
"#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
object used.</p>
</td>
</tr>
</table>
<h3><a name="link9" id="link9">Size Access Methods</a></h3>
<p>These methods are available only if the external size
parameter indicates that external size access is allowed.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <a href="#size_type55424436"><tt>size_type</tt></a>
get_actual_size
() <b>const</b>
</pre>
</td>
<td>
<p>Returns the actual size of the container.</p>
<p>This method returns the number of entries (used and
unused) in the container. It is different from the
container's size method, which returns the number of used
entries. Calling this method will not compile when
<a href=
"#External_Size_Access1380482982"><tt>External_Size_Access</tt></a>
== <tt><b>false</b></tt>.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
resize
(<a href=
"#size_type55424436"><tt>size_type</tt></a> suggested_new_size)
</pre>
</td>
<td>
<p>Resizes the container to <span class=
"c1"><tt>suggested_new_size</tt></span>, a suggested size
(the actual size will be determined by the <a href=
"#Size_Policy1072992366"><tt>Size_Policy</tt></a>
object).</p>
<p>Calling this method will not compile when <a href=
"#External_Size_Access1380482982"><tt>External_Size_Access</tt></a>
== <tt><b>false</b></tt>.</p>
</td>
</tr>
</table>
<h2><a name="link10" id="link10">Protected Methods</a></h2>
<h3><a name="link11" id="link11">Insert Search
Notifications.</a></h3>
<p>Notifications called during an insert operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_insert_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link12" id="link12">Find Search
Notifications.</a></h3>
<p>Notifications called during a find operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_find_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link13" id="link13">Erase Search
Notifications.</a></h3>
<p>Notifications called during an insert operation.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_start
()
</pre>
</td>
<td>
<p>Notifies a search started.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_collision
()
</pre>
</td>
<td>
<p>Notifies a search encountered a collision.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erase_search_end
()
</pre>
</td>
<td>
<p>Notifies a search ended.</p>
</td>
</tr>
</table>
<h3><a name="link14" id="link14">Content Change
Notifications</a></h3>
<p>Notifications called when the content of the table changes
in a way that can affect the resize policy.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_inserted
(<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
</pre>
</td>
<td>
<p>Notifies an element was inserted.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>void</b>
notify_erased
(<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
</pre>
</td>
<td>
<p>Notifies an element was erased.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_cleared
()
</pre>
</td>
<td>
<p>Notifies the table was cleared.</p>
</td>
</tr>
</table>
<h3><a name="link15" id="link15">Size Change
Notifications</a></h3>
<p>Notifications called when the table changes size.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
notify_resized
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Notifies the table was resized to <span class=
"c1"><tt>new_size</tt></span>.</p>
</td>
</tr>
</table>
<h3><a name="link16" id="link16">Queries</a></h3>
<p>Called to query whether/how to resize.</p>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
is_resize_needed
() <b>const</b>
</pre>
</td>
<td>
<p>Queries whether a resize is needed.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a href="#size_type55424436"><tt>size_type</tt></a>
get_new_size
(<a href="#size_type55424436"><tt>size_type</tt></a> size,
<a href=
"#size_type55424436"><tt>size_type</tt></a> num_used_e) <b>const</b>
</pre>
</td>
<td>
<p>Queries what the new <span class=
"c1"><tt>size</tt></span> should be, when the container
is resized naturally. The current size of the container
is <span class="c1"><tt>size</tt></span>, and the number
of used entries within the container is <span class=
"c1"><tt>num_used_e</tt></span>.</p>
</td>
</tr>
</table>
<h2><a name="link17" id="link17">Private Methods</a></h2>
<h3><a name="link18" id="link18">Overrides</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b> <b>void</b>
do_resize
(<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
</pre>
</td>
<td>
<p>Resizes to <span class=
"c1"><tt>new_size</tt></span>.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,164 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Hash Text Find Timing Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash-Based Text <tt>find</tt> Find Timing Test</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of values with keys from an
arbitrary text ([ <a href="references.html#wickland96thirty">wickland96thirty</a> ]) into
a container, then performs a series of finds using
<tt>find</tt> . It measures the average time for <tt>find</tt>
as a function of the number of values inserted.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/text_find_timing.cc"><tt>text_find_timing_test</tt></a>
thirty_years_among_the_dead_preproc.txt 200 200 2100)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test checks the effect of different range-hashing
functions, trigger policies, and cache-hashing policies (see
<a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Associative Containers::Hash-Based Containers::Hash
Policies</a> and <a href="hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a> ).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NCCG">NCCG</a>, <a href="#NCCM">NCCM</a>
and <a href="#NCCL">NCCL</a> show the results for the native
and collision-chaining types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respetively.</p>
<div id="NCCG_res_div">
<div id="NCCG_gcc">
<div id="NCCG_text_find_timing_test_hash">
<div id="NCCG_assoc">
<div id="NCCG_Native_and_collision-chaining_hash_text_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCG" id="NCCG"><img src="text_find_timing_test_hash_gcc.png" alt="no image" /></a></h6>NCCG: Native and collision-chaining hash text find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_sth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCM_res_div">
<div id="NCCM_msvc">
<div id="NCCM_text_find_timing_test_hash">
<div id="NCCM_assoc">
<div id="NCCM_Native_and_collision-chaining_hash_text_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCM" id="NCCM"><img src="text_find_timing_test_hash_msvc.png" alt="no image" /></a></h6>NCCM: Native and collision-chaining hash text find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_sth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NCCL_res_div">
<div id="NCCL_local">
<div id="NCCL_text_find_timing_test_hash">
<div id="NCCL_assoc">
<div id="NCCL_Native_and_collision-chaining_hash_text_find_timing_test_using__tt_find_455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCL" id= "NCCL"><img src="text_find_timing_test_hash_local.png" alt="no image" /></a></h6>NCCL: Native and collision-chaining hash text find timing test using <tt>find</tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>In this setting, the range-hashing scheme (See <a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a> ) affects
performance more than other policies. As Figure <a href="#NCCG">NCCG</a> shows, containers using mod-based
range-hashing (including the native hash-based container, which
is currently hard-wired to this scheme) have lower performance
than those using mask-based range-hashing. A modulo-based
range-hashing scheme's main benefit is that it takes into
account all hash-value bits. Standard string hash-functions are
designed to create hash values that are nearly-uniform as is [
<a href="references.html#knuth98sorting">knuth98sorting</a>
].</p>
<p>Trigger policies (see <a href="hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a> ),
<i>i.e.</i> the load-checks constants, affect performance to a
lesser extent.</p>
<p>Perhaps surprisingly, storing the hash value alongside each
entry affects performance only marginally, at least in
<tt>pb_ds</tt> 's implementation. (Unfortunately, it was not
possible to run the tests with <tt>std::tr1::unordered_map</tt>
's <tt>cache_hash_code = <b>true</b></tt> , as it appeared to
malfuntion.)</p>
<p><a href="assoc_performance_tests.html#hash_based_policies">Observations::Hash-Based
Containers' Policies</a> summarizes some observations on
hash-based containers' policies.</p>
</div>
</body>
</html>

View File

@ -1,163 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Hash Skewed Distribution Memory Use Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Hash-Based Skewed-Distribution Random-Integer <tt>find</tt>
Find Timing Test</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of values with a markedly
non-uniform i.i.d. integer keys into a container, then performs
a series of finds using <tt>find</tt> . It measures the average
time for <tt>find</tt> as a function of the number of values in
the containers. The keys are generated as follows. First, a
uniform integer is created; it is then shifted left 8 bits.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc"><tt>hash_zlob_random_int_find_timing_test</tt></a>
200 200 2100)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test checks the effect of different range-hashing
functions and trigger policies (see <a href="hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a> and
<a href="hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a>).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NHG">NHG</a>, <a href="#NHM">NHM</a>, and
<a href="#NHL">NHL</a> show the results for various hash-based
associative-containers in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively.</p>
<div id="NHG_res_div">
<div id="NHG_gcc">
<div id="NHG_hash_zlob_random_int_find_timing_test">
<div id="NHG_assoc">
<div id="NHG_Skewed-distribution_random_int_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="hash_zlob_random_int_find_timing_test_gcc.png" alt="no image" /></a></h6>NHG: Skewed-distribution random int find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
n_hash_map_ncah-
<tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHM_res_div">
<div id="NHM_msvc">
<div id="NHM_hash_zlob_random_int_find_timing_test">
<div id="NHM_assoc">
<div id="NHM_Skewed-distribution_random_int_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="hash_zlob_random_int_find_timing_test_msvc.png" alt="no image" /></a></h6>NHM: Skewed-distribution random int find timing test using <tt>find</tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_map_ncah-
<tt>stdext::hash_map</tt></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
<li>
gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
<a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
</li>
<li>
cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHL_res_div">
<div id="NHL_local">
<div id="NHL_hash_zlob_random_int_find_timing_test">
<div id="NHL_assoc">
<div id="NHL_Skewed-distribution_random_int_find_timing_test_using__tt_find_455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="hash_zlob_random_int_find_timing_test_local.png" alt="no image" /></a></h6>NHL: Skewed-distribution random int find timing test using <tt>find</tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>In this setting, the keys' distribution is so skewed that
the unerlying hash-table type affects performance marginally.
(This is in contrast with <a href="hash_text_find_find_timing_test.html">Hash-Based Text
<tt>find</tt> Find Timing Test</a> , <a href="hash_random_int_find_find_timing_test.html">Hash-Based
Random-Integer <tt>find</tt> Find Timing Test</a> , <a href="hash_random_int_subscript_find_timing_test.html">Hash-Based
Random-Integer Subscript Find Timing Test</a> and <a href="hash_random_int_subscript_insert_timing_test.html">Hash-Based
Random-Integer Subscript Insert Timing Test</a> .)</p>
<p>The range-hashing scheme affects performance dramatically. A
mask-based range-hashing scheme effectively maps all values
into the same bucket. Access degenerates into a search within
an unordered linked-list. In Figures <a href="#NHG">NHG</a> and
<a href="#NHM">NHM</a> , it should be noted that
<tt>std::tr1::unordered_map</tt> and <tt>stdext::hash_map</tt>
are hard-wired currently to mod-based and mask-based schemes,
respectively.</p>
<p>When observing the settings of this test, it is apparent
that the keys' distribution is far from natural. One might ask
if the test is not contrived to show that, in some cases,
mod-based range hashing does better than mask-based range
hashing. This is, in fact just the case. We did not encounter a
more natural case in which mod-based range hashing is better.
In our opnion, real-life key distributions are handled better
with an appropriate hash function and a mask-based
range-hashing function. (<a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc"><tt>shift_mask.cc</tt></a>
shows an example of handling this a-priori known skewed
distribution with a mask-based range-hashing function). If hash
performance is bad, a <i>&Chi;<sup>2</sup></i> test can be used
to check how to transform it into a more uniform
distribution.</p>
<p>For this reason, <tt>pb_ds</tt>'s default range-hashing
function is mask-based.</p>
<p><a href="assoc_performance_tests.html#hash_based_types">Observations::Hash-Based
Container Types</a> summarizes some observations on hash-based
containers; <a href="assoc_performance_tests.html#hash_based_policies">Observations::Hash-Based
Containers' Policies</a> summarizes some observations on
hash-based containers' policies.</p>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -1,146 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Policy-Based Data Structures</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Policy-Based Data Structures</h1>
<h5>Ami Tavory and Vladimir Dreizin, IBM Haifa Research
Laboratories, and Benjamin Kosnik, Red Hat</h5>
<h5><a href="mailto:pbassoc@gmail.com">pbassoc@gmail.com</a></h5>
<p>This is a library of policy-based elementary
data structures: associative containers and priority queues. It
is designed for high-performance, flexibility, semantic safety,
and conformance to the corresponding containers in <tt>std</tt>
and std::tr1 (except for some points where it differs by
design).</p>
<p>The documentation is organized as follows:</p>
<ol>
<li>
<a href="introduction.html">Introductory</a>
<ol>
<li><a href="introduction.html">Introduction</a></li>
<li><a href="motivation.html">Motivation</a></li>
<li><a href="prerequisites.html">Usage
Prerequisites</a></li>
</ol>
</li>
<li>
<a href="interface.html">Interface</a>
<ol>
<li><a href="tutorial.html">Short Tutorial</a></li>
<li><a href="concepts.html">Concepts</a></li>
<li><a href="interface.html">Specifics</a></li>
</ol>
</li>
<li>
<a href="design.html">Design</a>
<ol>
<li>
<a href="assoc_design.html">Associative Containers</a>
<ol>
<li><a href="ds_gen.html">Data-Structure
Genericity and Interface</a> </li>
<li><a href="tree_based_containers.html">Tree-Based
Containers</a></li>
<li><a href="trie_based_containers.html">Trie-Based
Containers</a></li>
<li><a href="hash_based_containers.html">Hash-Based
Containers</a></li>
<li><a href="lu_based_containers.html">List-Based
Containers</a> </li>
</ol>
</li>
<li><a href="pq_design.html">Priority Queues</a></li>
</ol>
</li>
<li>
<a href="examples.html">Examples</a>
<ol>
<li><a href="assoc_examples.html">Associative
Containers</a></li>
<li><a href="pq_examples.html">Priority Queues</a></li>
</ol>
</li>
<li>
<a href="tests.html">Tests</a>
<ol>
<li>
<a href="assoc_tests.html">Associative Containers</a>
<ol>
<li><a href="assoc_regression_tests.html">Regression
Tests</a></li>
<li><a href=
"assoc_performance_tests.html">Performance
Tests</a></li>
</ol>
</li>
<li>
<a href="pq_tests.html">Priority Queues</a>
<ol>
<li><a href="pq_regression_tests.html">Regression
Tests</a></li>
<li><a href="pq_performance_tests.html">Performance
Tests</a></li>
</ol>
</li>
</ol>
</li>
<li>
<a href="misc.html">Misc.</a>
<ol>
<li><a href="acks.html">Acknowledgments</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="disclaimer.html">Disclaimer and
Copyright</a></li>
<li><a href="references.html">References</a></li>
</ol>
</li>
</ol>
</div>
</body>
</html>

View File

@ -1,53 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>insert_error Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>insert_error</tt> Interface</h1>
<p>An entry cannot be inserted into a container object for logical
reasons (not, e.g., if memory is unavailable, in which case the
allocator's exception will be thrown).</p>
<p>This exception may be thrown, e.g., when a probe sequence in
a probing hash table does not encounter any free positions,
even though free positions are available.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/exception.hpp"><tt>exception.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="exceptions.html"><span class=
"c2"><tt>insert_error</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,446 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Interface Specifics</h1>
<p>Following are the library's interface specifics. <a href=
"tutorial.html">Short Tutorial</a> is a short tutorial, and
<a href="concepts.html">Concepts</a> describes some
concepts.</p>
<hr />
<h2><a name="namespaces" id="namespaces">Namespace</a></h2>
<p>All code is enclosed in namespace <tt>pb_ds</tt>. Nested within
this is namespace <tt>detail</tt>, which contains the parts of this
library that are considered implementation details.</p>
<hr />
<h2><a name="containers" id="containers">Containers</a></h2>
<h3><a name="containers_assoc" id=
"containers_assoc">Associative Containers</a></h3>
<ol>
<li><a href=
"container_base.html"><tt>container_base</tt></a> -
abstract base class for associative containers.</li>
<li>Hash-based:
<ol>
<li><a href=
"basic_hash_table.html"><tt>basic_hash_table</tt></a>
- abstract base class for hash-based
containers</li>
<li><a href=
"cc_hash_table.html"><tt>cc_hash_table</tt></a>
- concrete collision-chaining hash-based
containers</li>
<li><a href=
"gp_hash_table.html"><tt>gp_hash_table</tt></a>
- concrete (general) probing hash-based
containers</li>
</ol>
</li>
<li>Tree-based:
<ol>
<li><a href=
"basic_tree.html"><tt>basic_tree</tt></a>
- abstract base class for tree and trie based
containers</li>
<li><a href=
"tree.html"><tt>tree</tt></a>
- concrete base class for tree-based
containers</li>
<li><a href=
"trie.html"><tt>trie</tt></a>
- concrete base class for trie-based
containers</li>
</ol>
</li>
<li>List-based:
<ol>
<li><a href=
"list_update.html"><tt>list_update</tt></a> -
singly-linked list with update-policy container</li>
</ol>
</li>
</ol>
<h3><a name="containers_pq" id="containers_pq">Priority
Queues</a></h3>
<ol>
<li><a href="priority_queue.html"><tt>priority_queue</tt></a>
- priority queue</li>
</ol>
<hr />
<h2><a name="tag" id="tag">Container Tags and
Traits</a></h2>
<h3><a name="ds_ts" id="ds_ts">Container Tags</a></h3>
<h4><a name="ds_ts_common" id="ds_ts_common">Common</a></h4>
<ol>
<li><a href="container_tag.html"><tt>container_tag</tt></a> -
base class for data structure tags</li>
</ol>
<h4><a name="ds_ts_assoc" id=
"ds_ts_assoc">Associative-Containers</a></h4>
<ol>
<li><a href=
"associative_container_tag.html"><tt>associative_container_tag</tt></a> -
base class for associative-container data structure tags</li>
<li><a href=
"basic_hash_tag.html"><tt>basic_hash_tag</tt></a> -
base class for hash-based structure tags</li>
<li><a href="cc_hash_tag.html"><tt>cc_hash_tag</tt></a>
- collision-chaining hash structure tag</li>
<li><a href="gp_hash_tag.html"><tt>gp_hash_tag</tt></a>
- (general) probing hash structure tag</li>
<li><a href=
"basic_tree_tag.html"><tt>basic_tree_tag</tt></a>
- base class for tree-like structure tags</li>
<li><a href=
"tree_tag.html"><tt>tree_tag</tt></a> -
base class for tree structure tags</li>
<li><a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
- red-black tree structure tag/li&gt;</li>
<li><a href=
"splay_tree_tag.html"><tt>splay_tree_tag</tt></a> -
splay tree structure tag</li>
<li><a href="ov_tree_tag.html"><tt>ov_tree_tag</tt></a>
- ordered-vector tree structure tag</li>
<li><a href=
"trie_tag.html"><tt>trie_tag</tt></a> -
trie structure tag</li>
<li><a href=
"pat_trie_tag.html"><tt>pat_trie_tag</tt></a> -
PATRICIA trie structure tag</li>
<li><a href="list_update_tag.html"><tt>list_update_tag</tt></a> - list
(with updates) structure tag</li>
</ol>
<h4><a name="ds_ts_pq" id="ds_ts_pq">Priority-Queues</a></h4>
<ol>
<li><a href=
"priority_queue_tag.html"><tt>priority_queue_tag</tt></a> - base
class for priority-queue data structure tags</li>
<li><a href=
"pairing_heap_tag.html"><tt>pairing_heap_tag</tt></a> -
pairing-heap structure tag.</li>
<li><a href=
"binomial_heap_tag.html"><tt>binomial_heap_tag</tt></a>
- binomial-heap structure tag</li>
<li><a href=
"rc_binomial_heap_tag.html"><tt>rc_binomial_heap_tag</tt></a>
- redundant-counter binomial-heap (<i>i.e.</i>, a heap where
binomial trees form a sequence that is similar to a
de-amortized bit-addition algorithm) structure tag</li>
<li><a href=
"binary_heap_tag.html"><tt>binary_heap_tag</tt></a> -
binary heap (based on an array or an array of nodes)
structure tag</li>
<li><a href=
"thin_heap_tag.html"><tt>thin_heap_tag</tt></a> - thin
heap (an alternative [<a href=
"references.html#kt99fat_heaps">kt99fat_heaps</a>] to
Fibonacci heap) data structure tag.</li>
</ol>
<h3><a name="ds_inv_tag" id="ds_inv_tag">Invalidation-Guarantee
Tags</a></h3>
<ol>
<li><a href=
"basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a>
- weakest invalidation guarantee</li>
<li><a href=
"point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>
- stronger invalidation guarantee</li>
<li><a href=
"range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>
- strongest invalidation guarantee</li>
</ol>
<h3><a name="container_traits" id="container_traits">Container
Traits</a></h3>
<ol>
<li><a href="pq_container_traits.html"><tt>container_traits</tt></a> -
traits for determining underlying data structure
properties</li>
</ol>
<hr />
<h2><a name="ds_policy_classes" id=
"ds_policy_classes">Container Policy Classes</a></h2>
<h3><a name="hash_related_policies" id=
"hash_related_policies">Hash Policies</a></h3>
<h4>Hash and Probe Policies</h4>
<ol>
<li>Hash Functions:
<ol>
<li><a href="null_hash_fn.html"><tt>null_hash_fn</tt></a>
- type indicating one-step range-hashing</li>
</ol>
</li>
<li>Range-Hashing Functions:
<ol>
<li><a href="sample_range_hashing.html">Sample
range-hashing function</a> - interface required of a
range-hashing functor</li>
<li><a href=
"direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
- (bit) mask-based range hashing functor</li>
<li><a href=
"direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
- modulo-based range hashing functor</li>
</ol>
</li>
<li>Probe Functions:
<ol>
<li><a href="sample_probe_fn.html">Sample probe
function</a> - interface required of a probe functor</li>
<li><a href=
"null_probe_fn.html"><tt>null_probe_fn</tt></a> - type
indicating one-step ranged-probe</li>
<li><a href=
"linear_probe_fn.html"><tt>linear_probe_fn</tt></a> -
linear-probe functor</li>
<li><a href=
"quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>-
quadratic-probe functor</li>
</ol>
</li>
<li>Ranged-Hash Functions:
<ol>
<li><a href="sample_ranged_hash_fn.html">Sample
ranged-hash function</a> - interface required of a
ranged-hash functor</li>
</ol>
</li>
<li>Ranged-Probe Functions:
<ol>
<li><a href="sample_ranged_probe_fn.html">Sample
ranged-probe function</a> - interface required of a
ranged-probe functor</li>
</ol>
</li>
</ol>
<h4>Resize Policies</h4>
<ol>
<li>Resize Policies:
<ol>
<li><a href="sample_resize_policy.html">Sample resize
policy</a> - interface required of a resize policy</li>
<li><a href=
"hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- standard resize policy</li>
</ol>
</li>
<li>Size Policies:
<ol>
<li><a href="sample_size_policy.html">Sample size
policy</a> - interface required of a size policy</li>
<li><a href=
"hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
- exponential size policy (typically used with (bit) mask
range-hashing)</li>
<li><a href=
"hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
- prime size policy (typically used with modulo
range-hashing)</li>
</ol>
</li>
<li>Trigger Policies:
<ol>
<li><a href="sample_resize_trigger.html">Sample trigger
policy</a> - interface required of a trigger policy</li>
<li><a href=
"hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- trigger policy based on load checks</li>
<li><a href=
"cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
- trigger policy based on collision checks</li>
</ol>
</li>
</ol>
<h3><a name="tree_related_policies" id=
"tree_related_policies">Tree Policies</a></h3>
<h4>Tree Node-Update Policies</h4>
<ol>
<li><a href="sample_tree_node_update.html">Sample node
updater policy</a> - interface required of a tree
node-updating functor</li>
<li><a href=
"null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
- null policy indicating no updates are required</li>
<li><a href=
"tree_order_statistics_node_update.html"><tt>tree_order_statistics_node_update</tt></a>
- updater enabling order statistics queries</li>
</ol>
<h3><a name="trie_related_policies" id=
"trie_related_policies">Trie Policies</a></h3>
<h4>Trie Element-Access Traits</h4>
<ol>
<li><a href="sample_trie_e_access_traits.html">Sample
element-access traits</a> - interface required of
element-access traits</li>
<li><a href=
"string_trie_e_access_traits.html"><tt>string_trie_e_access_traits</tt></a>
- String element-access traits</li>
</ol>
<h4>Trie Node-Update Policies</h4>
<ol>
<li><a href="sample_trie_node_update.html">Sample node
updater policy</a> - interface required of a trie node
updater</li>
<li><a href=
"null_trie_node_update.html"><tt>null_trie_node_update</tt></a>
- null policy indicating no updates are required</li>
<li><a href=
"trie_prefix_search_node_update.html"><tt>trie_prefix_search_node_update</tt></a>
- updater enabling prefix searches</li>
<li><a href=
"trie_order_statistics_node_update.html"><tt>trie_order_statistics_node_update</tt></a>
- updater enabling order statistics queries</li>
</ol>
<h3><a name="list_related_policies" id=
"list_related_policies">List Policies</a></h3>
<h4>List Update Policies</h4>
<ol>
<li><a href="sample_update_policy.html">Sample list update
policy</a> - interface required of a list update policy</li>
<li><a href=
"move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
- move-to-front update algorithm</li>
<li><a href=
"counter_lu_policy.html"><tt>counter_lu_policy</tt></a> -
counter update algorithm</li>
</ol>
<h3><a name="ds_pol" id="ds_pol">Mapped-Type Policies</a></h3>
<ol>
<li><a href=
"null_mapped_type.html"><tt>null_mapped_type</tt></a> - data
policy indicating that a container is a "set"</li>
</ol>
<hr />
<h2><a name="exceptions" id="exceptions">Exceptions</a></h2>
<ol>
<li><a href="exceptions.html"><tt>container_error</tt></a>
- base class for all policy-based data structure errors</li>
<li><a href=
"insert_error.html"><tt>insert_error</tt></a></li>
<li><a href="join_error.html"><tt>join_error</tt></a></li>
<li><a href=
"resize_error.html"><tt>resize_error</tt></a></li>
</ol>
</div>
</body>
</html>

View File

@ -1,120 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Introduction</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Introduction</h1>
<p>This section describes what problems the library attempts to
solve. <a href="motivation.html">Motivation</a> describes the
reasons we think it solves these problems better than similar
libraries.</p>
<h2><a name="assoc" id="assoc">Associative Containers</a></h2>
<ol>
<li>Associative containers depend on their policies to a very
large extent. Implicitly hard-wiring policies can hamper their
performance and limit their functionality. An efficient
hash-based container, for example, requires policies for
testing key equivalence, hashing keys, translating hash
values into positions within the hash table, and determining
when and how to resize the table internally. A tree-based
container can efficiently support order statistics,
<i>i.e.</i>, the ability to query what is the order of each
key within the sequence of keys in the container, but only if
the container is supplied with a policy to internally update
meta-data. There are many other such examples.<p></p></li>
<li>Ideally, all associative containers would share the same
interface. Unfortunately, underlying data structures and
mapping semantics differentiate between different containers.
For example, suppose one writes a generic function
manipulating an associative container <tt>Cntnr</tt>:
<pre>
template&lt;typename Cntnr&gt;
void
some_op_sequence(Cntnr&amp; r_cnt)
{
...
}
</pre>
then what can one assume about <tt>Cntnr</tt>? The answer
varies according to its underlying data structure. If the
underlying data structure of <tt>Cntnr</tt> is based on a tree or
trie, then the order of elements is well defined; otherwise, it is
not, in general. If the underlying data structure of <tt>Cntnr</tt>
is based on a collision-chaining hash table, then modifying
r_<tt>Cntnr</tt> will not invalidate its iterators' order; if the
underlying data structure is a probing hash table, then this is not
the case. If the underlying data structure is based on a tree or
trie, then <tt>r_cnt</tt> can efficiently be split; otherwise, it
cannot, in general. If the underlying data structure is a red-black
tree, then splitting <tt>r_cnt</tt> is exception-free; if it is an
ordered-vector tree, exceptions can be thrown.
<p></p></li>
</ol>
<h2><a name="pq" id="pq">Priority Queues</a></h2>
<p>Priority queues are useful when one needs to efficiently
access a minimum (or maximum) value as the set of values
changes.</p>
<ol>
<li>Most useful data structures for priority queues have a
relatively simple structure, as they are geared toward
relatively simple requirements. Unfortunately, these structures
do not support access to an arbitrary value, which turns out to
be necessary in many algorithms. Say, decreasing an arbitrary
value in a graph algorithm. Therefore, some extra mechanism is
necessary and must be invented for accessing arbitrary
values. There are at least two alternatives: embedding an
associative container in a priority queue, or allowing
cross-referencing through iterators. The first solution adds
significant overhead; the second solution requires a precise
definition of iterator invalidation. Which is the next
point...<p></p></li>
<li>Priority queues, like hash-based containers, store values in
an order that is meaningless and undefined externally. For
example, a <tt>push</tt> operation can internally reorganize the
values. Because of this characteristic, describing a priority
queues' iterator is difficult: on one hand, the values to which
iterators point can remain valid, but on the other, the logical
order of iterators can change unpredictably.<p></p></li>
<li>Roughly speaking, any element that is both inserted to a
priority queue (<i>e.g.</i>, through <tt>push</tt>) and removed
from it (<i>e.g.</i>, through <tt>pop</tt>), incurs a
logarithmic overhead (in the amortized sense). Different
underlying data structures place the actual cost differently:
some are optimized for amortized complexity, whereas others
guarantee that specific operations only have a constant
cost. One underlying data structure might be chosen if modifying
a value is frequent (Dijkstra's shortest-path algorithm),
whereas a different one might be chosen
otherwise. Unfortunately, an array-based binary heap - an
underlying data structure that optimizes (in the amortized
sense) <tt>push</tt> and <tt>pop</tt> operations, differs from
the others in terms of its invalidation guarantees. Other design
decisions also impact the cost and placement of the overhead, at
the expense of more difference in the the kinds of operations
that the underlying data structure can support. These
differences pose a challenge when creating a uniform interface
for priority queues.<p></p></li>
</ol>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -1,48 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>join_error Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>join_error</tt> Interface</h1>
<p>A join cannot be performed logical reasons (i.e., the ranges of the
two container objects
being joined
overlaps.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/exception.hpp"><tt>exception.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre><a href="exceptions.html"><span class="c2"><tt>join_error</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,140 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>linear_probe_fn Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>linear_probe_fn</tt> Interface</h1>
<p>A probe sequence policy using fixed increments.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Size_Type42920436" id=
"Size_Type42920436"><b>typename</b> Size_Type </a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
<td>size_t</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">General Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="size_type55424436" id="size_type55424436">size_type</a>
</pre>
</td>
<td>
<pre>
<a href="#Size_Type42920436"><tt>Size_Type</tt></a>
</pre>
</td>
<td>
<p>Size type.</p>
</td>
</tr>
</table>
<h2><a name="link4" id="link4">Public Methods</a></h2>
<h3><a name="link5" id="link5">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class="c2"><tt>linear_probe_fn</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
<h2><a name="link6" id="link6">Protected Methods</a></h2>
<h3><a name="link7" id="link7">Offset Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <a href="#size_type55424436"><tt>size_type</tt></a>
<b>operator</b>()
(<a href=
"#size_type55424436"><tt>size_type</tt></a> i) <b>const</b>
</pre>
</td>
<td>
<p>Returns the <span class="c1"><tt>i</tt></span>-th
offset from the hash value.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,316 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>list_update Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>list_update</tt> Interface</h1>
<p>A list-update based associative container.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Key2501" id="Key2501"><b>typename</b> Key</a>
</pre>
</td>
<td>
<p>Key type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Mapped318655" id="Mapped318655"><b>typename</b> Mapped</a>
</pre>
</td>
<td>
<p>Mapped type.</p>
</td>
<td>-</td>
</tr>
<tr>
<td>
<pre>
<a name="Eq_Fn60085" id="Eq_Fn60085"><b>class</b> Eq_Fn </a>
</pre>
</td>
<td>
<p>Equivalence functor.</p>
</td>
<td>
<pre>
std::equal_to&lt;<a href="#Key2501"><tt>Key</tt></a>&gt;
</pre>
</td>
</tr>
<tr>
<td>
<pre>
<a name="Update_Policy1671938590" id=
"Update_Policy1671938590"><b>class</b> Update_Policy </a>
</pre>
</td>
<td>
<p>Update policy (determines when an element will be
moved to the front of the list.</p>
</td>
<td><a href="move_to_front_lu_policy.html"><span class=
"c2"><tt>move_to_front_lu_policy</tt></span></a></td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator </a>
</pre>
</td>
<td>
<p>Allocator type.</p>
</td>
<td>
<pre>
std::allocator&lt;<b>char</b>&gt;
</pre>
</td>
</tr>
</table>
<h2><a name="link2" id="link2">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="container_base.html"><span class=
"c2"><tt>container_base</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
<h2><a name="link3" id="link3">Public Types and
Constants</a></h2>
<h3><a name="link4" id="link4">Policy definitions.</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="eq_fn80245" id="eq_fn80245">eq_fn</a>
</pre>
</td>
<td>
<pre>
<a href="#Eq_Fn60085"><tt>Eq_Fn</tt></a>
</pre>
</td>
<td>
<p>Equivalence functor type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="update_policy894603998" id=
"update_policy894603998">update_policy</a>
</pre>
</td>
<td>
<pre>
<a href="#Update_Policy1671938590"><tt>Update_Policy</tt></a>
</pre>
</td>
<td>
<p>List update policy type.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="allocator48440069" id="allocator48440069">allocator</a>
</pre>
</td>
<td>
<pre>
<a href="#Allocator35940069"><tt>Allocator</tt></a>
</pre>
</td>
<td>
<p><a href="#Allocator35940069"><tt>Allocator</tt></a>
type.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Public Methods</a></h2>
<h3><a name="link6" id="link6">Constructors, Destructor, and
Related</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
list_update
()
</pre>
</td>
<td>
<p>Default constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
list_update
(It first_it,
It last_it)
</pre>
</td>
<td>
<p>Constructor taking iterators to a range of
value_types. The value_types between <span class=
"c1"><tt>first_it</tt></span> and <span class=
"c1"><tt>last_it</tt></span> will be inserted into the
container object.</p>
</td>
</tr>
<tr>
<td>
<pre>
list_update
(<b>const</b> <span class=
"c2"><tt>list_update</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Copy constructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>virtual</b>
~list_update
()
</pre>
</td>
<td>
<p>Destructor.</p>
</td>
</tr>
<tr>
<td>
<pre>
<span class="c2"><tt>list_update</tt></span> &amp;
<b>operator</b>=
(<b>const</b> <span class=
"c2"><tt>list_update</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Assignment operator.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>void</b>
swap
(<span class="c2"><tt>list_update</tt></span> &amp;other)
</pre>
</td>
<td>
<p>Swaps content.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>list_update_tag Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>list_update_tag</tt> Interface</h1>
<p>List-update data structure tag.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/tag_and_trait.hpp"><tt>tag_and_trait.hpp</tt></a></p>
<h2><a name="link1" id="link1">Base Classes</a></h2>
<table class="c1" width="100%" border="1" summary="Bases">
<tr>
<td width="80%" align="left"><b>Class</b></td>
<td width="20%" align="left"><b>Derivation Type</b></td>
</tr>
<tr>
<td>
<pre>
<a href="associative_container_tag.html"><span class=
"c2"><tt>associative_container_tag</tt></span></a>
</pre>
</td>
<td>
<p>public</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,229 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>List-Based Containers</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>List-Update Design</h1>
<h2><a name="overview" id="overview">Overview</a></h2>
<p>The list-based container has the following declaration:</p>
<pre>
<b>template</b>&lt;
<b>typename</b> Key,
<b>typename</b> Mapped,
<b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
<b>typename</b> Update_Policy = <a href=
"move_to_front_lu_policy.html">move_to_front_lu_policy&lt;&gt;</a>,
<b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
<b>class</b> <a href="list_update.html">list_update</a>;
</pre>
<p>The parameters have the following meaning:</p>
<ol>
<li><tt>Key</tt> is the key type.</li>
<li><tt>Mapped</tt> is the mapped-policy, and is explained in
<a href="tutorial.html#assoc_ms">Tutorial::Associative
Containers::Associative Containers Others than Maps</a>.</li>
<li><tt>Eq_Fn</tt> is a key equivalence functor.</li>
<li><tt>Update_Policy</tt> is a policy updating positions in
the list based on access patterns. It is described in the
following subsection.</li>
<li><tt>Allocator</tt> is an allocator
type.</li>
</ol>
<p>A list-based associative container is a container that
stores elements in a linked-list. It does not order the
elements by any particular order related to the keys.
List-based containers are primarily useful for creating
"multimaps" (see <a href=
"motivation.html#assoc_mapping_semantics">Motivation::Associative
Containers::Avoiding Multiple Keys</a> and <a href=
"tutorial.html#assoc_ms">Tutorial::Associative
Containers::Associative Containers Others than Maps</a>). In
fact, list-based containers are designed in <tt>pb_ds</tt>
expressly for this purpose. This is explained further in
<a href="#mmaps">Use for "Multimaps"</a>.</p>
<p>List-based containers might also be useful for some rare
cases, where a key is encapsulated to the extent that only
key-equivalence can be tested. Hash-based containers need to
know how to transform a key into a size type, and tree-based
containers need to know if some key is larger than another.
List-based associative containers, conversely, only need to
know if two keys are equivalent.</p>
<p>Since a list-based associative container does not order
elements by keys, is it possible to order the list in some
useful manner? Remarkably, many on-line competitive [<a href=
"references.html#motwani95random">motwani95random</a>]
algorithms exist for reordering lists to reflect access
prediction [<a href=
"references.html#andrew04mtf">andrew04mtf</a>].</p>
<h2><a name="list_updates" id="list_updates">List
Updates</a></h2>
<h3><a name="general" id="general">General Terms</a></h3>
<p>Figure <a href="#simple_list">A simple list</a> shows a
simple list of integer keys. If we search for the integer 6, we
are paying an overhead: the link with key 6 is only the fifth
link; if it were the first link, it could be accessed
faster.</p>
<h6 class="c1"><a name="simple_list" id="simple_list"><img src=
"simple_list.png" alt="no image" /></a></h6>
<h6 class="c1">A simple list.</h6>
<p>List-update algorithms reorder lists as elements are
accessed. They try to determine, by the access history, which
keys to move to the front of the list. Some of these algorithms
require adding some metadata alongside each entry.</p>
<p>For example, Figure <a href="#lu">The counter algorithm</a>
-A shows the counter algorithm. Each node contains both a key
and a count metadata (shown in bold). When an element is
accessed (<i>e.g.</i> 6) its count is incremented, as shown in
Figure <a href="#lu">The counter algorithm</a> -B. If the count
reaches some predetermined value, say 10, as shown in Figure
<a href="#lu">The counter algorithm</a> -C, the count is set to
0 and the node is moved to the front of the list, as in Figure
<a href="#lu">The counter algorithm</a> -D.</p>
<h6 class="c1"><a name="lu" id="lu"><img src="lu.png" alt=
"no image" /></a></h6>
<h6 class="c1">The counter algorithm.</h6>
<h3><a name="imp_pb_ds" id="imp_pb_ds">Implementation</a></h3>
<p><tt>pb_ds</tt> allows instantiating lists with policies
implementing any algorithm moving nodes to the front of the
list (policies implementing algorithms interchanging nodes are
unsupported).</p>
<p>Associative containers based on lists are parametrized by a
<tt>Update_Policy</tt> parameter. This parameter defines the
type of metadata each node contains, how to create the
metadata, and how to decide, using this metadata, whether to
move a node to the front of the list. A list-based associative
container object derives (publicly) from its update policy.
Figure <a href="#update_policy_cd">A list and its update
policy</a> shows the scheme, as well as some predefined
policies (which are explained below).</p>
<h6 class="c1"><a name="update_policy_cd" id=
"update_policy_cd"><img src="update_policy_cd.png" alt=
"no image" /></a></h6>
<h6 class="c1">A list and its update policy.</h6>
<p>An instantiation of <tt>Update_Policy</tt> must define
internally <tt>update_metadata</tt> as the metadata it
requires. Internally, each node of the list contains, besides
the usual key and data, an instance of <tt><b>typename</b>
Update_Policy::update_metadata</tt>.</p>
<p>An instantiation of <tt>Update_Policy</tt> must define
internally two operators:</p>
<pre>
update_metadata
<b>operator</b>()();
<b>bool</b>
<b>operator</b>()(update_metadata &amp;);
</pre>
<p>The first is called by the container object, when creating a
new node, to create the node's metadata. The second is called
by the container object, when a node is accessed (<i>e.g.</i>,
when a find operation's key is equivalent to the key of the
node), to determine whether to move the node to the front of
the list.</p>
<p>The library contains two predefined implementations of
list-update policies [<a href=
"references.html#andrew04mtf">andrew04mtf</a>]. The first is
<a href=
"counter_lu_policy.html"><tt>counter_lu_policy</tt></a>, which
implements the counter algorithm described above. The second is
<a href=
"move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>,
which unconditionally move an accessed element to the front of
the list. The latter type is very useful in <tt>pb_ds</tt>,
since there is no need to associate metadata with each element
(this is explained further in <a href="#mmaps">Use for
"Multimaps"</a>).</p>
<h2><a name="mmaps" id="mmaps">Use for "Multimaps"</a></h2>
<p>In <tt>pb_ds</tt>, there are no equivalents for the STL's
multimaps and multisets; instead one uses an associative
container mapping primary keys to secondary keys (see <a href=
"motivation.html#assoc_mapping_semantics">Motivation::Associative
Containers::Alternative to Multiple Equivalent Keys</a> and
<a href="tutorial.html#assoc_ms">Tutorial::Associative
Containers::Associative Containers Others than Maps</a>).</p>
<p>List-based containers are especially useful as associative
containers for secondary keys. In fact, they are implemented
here expressly for this purpose.</p>
<p>To begin with, these containers use very little per-entry
structure memory overhead, since they can be implemented as
singly-linked lists. (Arrays use even lower per-entry memory
overhead, but they are less flexible in moving around entries,
and have weaker invalidation guarantees).</p>
<p>More importantly, though, list-based containers use very
little per-container memory overhead. The memory overhead of an
empty list-based container is practically that of a pointer.
This is important for when they are used as secondary
associative-containers in situations where the average ratio of
secondary keys to primary keys is low (or even 1).</p>
<p>In order to reduce the per-container memory overhead as much
as possible, they are implemented as closely as possible to
singly-linked lists.</p>
<ol>
<li>List-based containers do not store internally the number
of values that they hold. This means that their <tt>size</tt>
method has linear complexity (just like <tt>std::list</tt>).
Note that finding the number of equivalent-key values in an
STL multimap also has linear complexity (because it must be
done, <i>e.g.</i>, via <tt>std::distance</tt> of the
multimap's <tt>equal_range</tt> method), but usually with
higher constants.</li>
<li>Most associative-container objects each hold a policy
object (<i>e.g.</i>, a hash-based container object holds a
hash functor). List-based containers, conversely, only have
class-wide policy objects.</li>
</ol>
<p>See also <a href=
"assoc_performance_tests.html#msc">Associative-Container
Performance Tests::Observations::Mapping-Semantics
Considerations</a>.</p>
</div>
</body>
</html>

View File

@ -1,26 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Misc.</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Misc.</h1>
<p><a href="acks.html" title="Acknowledgements">Acks</a>
contains acknowledgments; <a href="contact.html">Contact</a>
contains contact information;<a href=
"disclaimer.html">Disclaimer and Copyright</a> is a standard
disclaimer, and <a href="references.html">References</a>
contains references.</p>
</div>
</body>
</html>

View File

@ -1,993 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>Motivation</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>Motivation</h1>
<p>Many fine associative-container libraries were already
written, most notably, the STL's associative containers. Why
then write another library? This section shows some possible
advantages of this library, when considering the challenges in
<a href="introduction.html">Introduction</a>. Many of these
points stem from the fact that the STL introduced
associative-containers in a two-step process (first
standardizing tree-based containers, only then adding
hash-based containers, which are fundamentally different), did
not standardize priority queues as containers, and (in our
opinion) overloads the iterator concept.</p>
<h2><a name="assoc" id="assoc">Associative Containers</a></h2>
<h3><a name="assoc_policies" id="assoc_policies">More
Configuration Choices</a></h3>
<p>Associative containers require a relatively large number of
policies to function efficiently in various settings. In some
cases this is needed for making their common operations more
efficient, and in other cases this allows them to support a
larger set of operations</p>
<ol>
<li>Hash-based containers, for example, support look-up and
insertion methods (<i>e.g.</i>, <tt>find</tt> and
<tt>insert</tt>). In order to locate elements quickly, they
are supplied a hash functor, which instruct how to transform
a key object into some size type; <i>e.g.</i>, a hash functor
might transform <tt>"hello"</tt> into <tt>1123002298</tt>. A
hash table, though, requires transforming each key object
into some size-type type in some specific domain;
<i>e.g.</i>, a hash table with a 128-long table might
transform <tt>"hello"</tt> into position 63. The policy by
which the hash value is transformed into a position within
the table can dramatically affect performance (see <a href=
"hash_based_containers.html#hash_policies">Design::Associative
Containers::Hash-Based Containers::Hash Policies</a>).
Hash-based containers also do not resize naturally (as
opposed to tree-based containers, for example). The
appropriate resize policy is unfortunately intertwined with
the policy that transforms hash value into a position within
the table (see <a href=
"hash_based_containers.html#resize_policies">Design::Associative
Containers::Hash-Based Containers::Resize Policies</a>).
<p><a href=
"assoc_performance_tests.html#hash_based">Associative-Container
Performance Tests::Hash-Based Containers</a> quantifies
some of these points.</p>
</li>
<li>Tree-based containers, for example, also support look-up
and insertion methods, and are primarily useful when
maintaining order between elements is important. In some
cases, though, one can utilize their balancing algorithms for
completely different purposes.
<p>Figure <a href="#node_invariants">Metadata for
order-statistics and interval intersections</a>-A, for
example, shows a tree whose each node contains two entries:
a floating-point key, and some size-type <i>metadata</i>
(in bold beneath it) that is the number of nodes in the
sub-tree. (<i>E.g.</i>, the root has key 0.99, and has 5
nodes (including itself) in its sub-tree.) A container based
on this data structure can obviously answer efficiently
whether 0.3 is in the container object, but it can also
answer what is the order of 0.3 among all those in the
container object [<a href=
"references.html#clrs2001">clrs2001</a>] (see <a href=
"assoc_examples.html#tree_like_based">Associative Container
Examples::Tree-Like-Based Containers (Trees and
Tries)</a>).</p>
<p>As another example, Figure <a href=
"#node_invariants">Metadata for order-statistics and
interval intersections</a>-B shows a tree whose each node
contains two entries: a half-open geometric line interval,
and a number <i>metadata</i> (in bold beneath it) that is
the largest endpoint of all intervals in its sub-tree.
(<i>E.g.</i>, the root describes the interval <i>[20,
36)</i>, and the largest endpoint in its sub-tree is 99.) A
container based on this data structure can obviously answer
efficiently whether <i>[3, 41)</i> is in the container
object, but it can also answer efficiently whether the
container object has intervals that intersect <i>[3,
41)</i> (see <a href=
"assoc_examples.html#tree_like_based">Associative Container
Examples::Tree-Like-Based Containers (Trees and
Tries)</a>). These types of queries are very useful in
geometric algorithms and lease-management algorithms.</p>
<p>It is important to note, however, that as the trees are
modified, their internal structure changes. To maintain
these invariants, one must supply some policy that is aware
of these changes (see <a href=
"tree_based_containers.html#invariants">Design::Associative
Containers::Tree-Based Containers::Node Invariants</a>);
without this, it would be better to use a linked list (in
itself very efficient for these purposes).</p>
<p><a href=
"assoc_performance_tests.html#tree_like_based">Associative-Container
Performance Tests::Tree-Like-Based Containers</a>
quantifies some of these points.</p>
</li>
</ol>
<h6 class="c1"><a name="node_invariants" id=
"node_invariants"><img src="node_invariants.png" alt=
"no image" /></a></h6>
<h6 class="c1">Metadata for order-statistics and interval
intersections.</h6>
<h3><a name="assoc_ds_genericity" id="assoc_ds_genericity">More
Data Structures and Traits</a></h3>
<p>The STL contains associative containers based on red-black
trees and collision-chaining hash tables. These are obviously
very useful, but they are not ideal for all types of
settings.</p>
<p>Figure <a href=
"#different_underlying_data_structures">Different underlying
data structures</a> shows different underlying data structures
(the ones currently supported in <tt>pb_ds</tt>). A shows a
collision-chaining hash-table, B shows a probing hash-table, C
shows a red-black tree, D shows a splay tree, E shows a tree
based on an ordered vector(implicit in the order of the
elements), F shows a PATRICIA trie, and G shows a list-based
container with update policies.</p>
<p>Each of these data structures has some performance benefits,
in terms of speed, size or both (see <a href=
"assoc_performance_tests.html">Associative-Container
Performance Tests</a> and <a href=
"assoc_performance_tests.html#dss_family_choice">Associative-Container
Performance Tests::Observations::Underlying Data-Structure
Families</a>). For now, though, note that <i>e.g.</i>,
vector-based trees and probing hash tables manipulate memory
more efficiently than red-black trees and collision-chaining
hash tables, and that list-based associative containers are
very useful for constructing "multimaps" (see <a href=
"#assoc_mapping_semantics">Alternative to Multiple Equivalent
Keys</a>, <a href=
"assoc_performance_tests.html#multimaps">Associative Container
Performance Tests::Multimaps</a>, and <a href=
"assoc_performance_tests.html#msc">Associative Container
Performance Tests::Observations::Mapping-Semantics
Considerations</a>).</p>
<h6 class="c1"><a name="different_underlying_data_structures"
id="different_underlying_data_structures"><img src=
"different_underlying_dss.png" alt="no image" /></a></h6>
<h6 class="c1">Different underlying data structures.</h6>
<p>Now consider a function manipulating a generic associative
container, <i>e.g.</i>,</p>
<pre>
<b>template</b>&lt;
<b>class</b> Cntnr&gt;
<b>int</b>
some_op_sequence
(Cntnr &amp;r_cnt)
{
...
}
</pre>
<p>Ideally, the underlying data structure of <tt>Cntnr</tt>
would not affect what can be done with <tt>r_cnt</tt>.
Unfortunately, this is not the case.</p>
<p>For example, if <tt>Cntnr</tt> is <tt>std::map</tt>, then
the function can use <tt>std::for_each(r_cnt.find(foo),
r_cnt.find(bar), foobar)</tt> in order to apply <tt>foobar</tt>
to all elements between <tt>foo</tt> and <tt>bar</tt>. If
<tt>Cntnr</tt> is a hash-based container, then this call's
results are undefined.</p>
<p>Also, if <tt>Cntnr</tt> is tree-based, the type and object
of the comparison functor can be accessed. If <tt>Cntnr</tt> is
hash based, these queries are nonsensical.</p>
<p>There are various other differences based on the container's
underlying data structure. For one, they can be constructed by,
and queried for, different policies. Furthermore:</p>
<ol>
<li>Containers based on C, D, E and F store elements in a
meaningful order; the others store elements in a meaningless
(and probably time-varying) order. By implication, only
containers based on C, D, E and F can support erase
operations taking an iterator and returning an iterator to
the following element without performance loss (see <a href=
"#assoc_ers_methods">Slightly Different Methods::Methods
Related to Erase</a>).</li>
<li>Containers based on C, D, E, and F can be split and
joined efficiently, while the others cannot. Containers based
on C and D, furthermore, can guarantee that this is
exception-free; containers based on E cannot guarantee
this.</li>
<li>Containers based on all but E can guarantee that erasing
an element is exception free; containers based on E cannot
guarantee this. Containers based on all but B and E can
guarantee that modifying an object of their type does not
invalidate iterators or references to their elements, while
containers based on B and E cannot. Containers based on C, D,
and E can furthermore make a stronger guarantee, namely that
modifying an object of their type does not affect the order
of iterators.</li>
</ol>
<p>A unified tag and traits system (as used for the STL's
iterators, for example) can ease generic manipulation of
associative containers based on different underlying
data structures (see <a href=
"tutorial.html#assoc_ds_gen">Tutorial::Associative
Containers::Determining Containers' Attributes</a> and <a href=
"ds_gen.html#container_traits">Design::Associative
Containers::Data-Structure Genericity::Data-Structure Tags and
Traits</a>).</p>
<h3><a name="assoc_diff_it" id="assoc_diff_it">Differentiating
between Iterator Types</a></h3>
<p>Iterators are centric to the STL's design, because of the
container/algorithm/iterator decomposition that allows an
algorithm to operate on a range through iterators of some
sequence (<i>e.g.</i>, one originating from a container).
Iterators, then, are useful because they allow going over a
<u>sequence</u>. The STL also uses iterators for accessing a
<u>specific</u> element - <i>e.g.</i>, when an associative
container returns one through <tt>find</tt>. The STL, however,
consistently uses the same types of iterators for both
purposes: going over a range, and accessing a specific found
element. Before the introduction of hash-based containers to
the STL, this made sense (with the exception of priority
queues, which are discussed in <a href="#pq">Priority
Queues</a>).</p>
<p>Using the STL's associative containers together with
non-order-preserving associative containers (and also because
of priority-queues container), there is a possible need for
different types of iterators for self-organizing containers -
the iterator concept seems overloaded to mean two different
things (in some cases). The following subsections explain this;
<a href="tutorial.html#assoc_find_range">Tutorial::Associative
Containers::Point-Type and Range-Type Methods</a> explains an
alternative design which does not complicate the use of
order-preserving containers, but is better for unordered
containers; <a href=
"ds_gen.html#find_range">Design::Associative
Containers::Data-Structure Genericity::Point-Type and
Range-Type Methods</a> explains the design further.</p>
<h4><a name="assoc_find_it_range_it" id=
"assoc_find_it_range_it">Using Point-Type Iterators for
Range-Type Operations</a></h4>
<p>Suppose <tt>cntnr</tt> is some associative container, and
say <tt>c</tt> is an object of type <tt>cntnr</tt>. Then what
will be the outcome of</p>
<pre>
std::for_each(c.find(1), c.find(5), foo);
</pre>
<p>If <tt>cntnr</tt> is a tree-based container object, then an
in-order walk will apply <tt>foo</tt> to the relevant elements,
<i>e.g.</i>, as in Figure <a href="#range_it_in_hts">Range
iteration in different data structures</a> -A. If <tt>c</tt> is
a hash-based container, then the order of elements between any
two elements is undefined (and probably time-varying); there is
no guarantee that the elements traversed will coincide with the
<i>logical</i> elements between 1 and 5, <i>e.g.</i>, as in
Figure <a href="#range_it_in_hts">Range iteration in different
data structures</a>-B.</p>
<h6 class="c1"><a name="range_it_in_hts" id=
"range_it_in_hts"><img src="point_iterators_range_ops_1.png"
alt="no image" /></a></h6>
<h6 class="c1">Range iteration in different
data structures.</h6>
<p>In our opinion, this problem is not caused just because
red-black trees are order preserving while collision-chaining
hash tables are (generally) not - it is more fundamental. Most
of the STL's containers order sequences in a well-defined
manner that is determined by their <u>interface</u>: calling
<tt>insert</tt> on a tree-based container modifies its sequence
in a predictable way, as does calling <tt>push_back</tt> on a
list or a vector. Conversely, collision-chaining hash tables,
probing hash tables, priority queues, and list-based containers
(which are very useful for "multimaps") are self-organizing
data structures; the effect of each operation modifies their
sequences in a manner that is (practically) determined by their
<u>implementation</u>.</p>
<p>Consequently, applying an algorithm to a sequence obtained
from most containers <u>may or may not</u> make sense, but
applying it to a sub-sequence of a self-organizing container
<u>does not</u>.</p>
<h4><a name="assoc_range_it_for_find_it" id=
"assoc_range_it_for_find_it">The Cost of Enabling Range
Capabilities to Point-Type Iterators</a></h4>
<p>Suppose <tt>c</tt> is some collision-chaining hash-based
container object, and one calls <tt>c.find(3)</tt>. Then what
composes the returned iterator?</p>
<p>Figure <a href="#find_its_in_hash_tables">Point-type
iterators in hash tables</a>-A shows the simplest (and most
efficient) implementation of a collision-chaining hash table.
The little box marked <tt>point_iterator</tt> shows an object
that contains a pointer to the element's node. Note that this
"iterator" has no way to move to the next element (<i>i.e.</i>,
it cannot support <tt><b>operator</b>++</tt>). Conversely, the
little box marked <tt>iterator</tt> stores both a pointer to
the element, as well as some other information (<i>e.g.</i>,
the bucket number of the element). the second iterator, then,
is "heavier" than the first one- it requires more time and
space. If we were to use a different container to
cross-reference into this hash-table using these iterators - it
would take much more space. As noted in <a href=
"#assoc_find_it_range_it">Using Point-Type Iterators for
Range-Type Operations</a>, nothing much can be done by
incrementing these iterators, so why is this extra information
needed?</p>
<p>Alternatively, one might create a collision-chaining
hash-table where the lists might be linked, forming a
monolithic total-element list, as in Figure <a href=
"#find_its_in_hash_tables">Point-type iterators in hash
tables</a>-B (this seems similar to the Dinkumware design
[<a href="references.html#dinkumware_stl">dinkumware_stl</a>]).
Here the iterators are as light as can be, but the hash-table's
operations are more complicated.</p>
<h6 class="c1"><a name="find_its_in_hash_tables" id=
"find_its_in_hash_tables"><img src=
"point_iterators_range_ops_2.png" alt="no image" /></a></h6>
<h6 class="c1">Point-type iterators in hash tables.</h6>
<p>It should be noted that containers based on
collision-chaining hash-tables are not the only ones with this
type of behavior; many other self-organizing data structures
display it as well.</p>
<h4><a name="assoc_inv_guar" id="assoc_inv_guar">Invalidation
Guarantees</a></h4>
<p>Consider the following snippet:</p>
<pre>
it = c.find(3);
c.erase(5);
</pre>
<p>Following the call to <tt>erase</tt>, what is the validity
of <tt>it</tt>: can it be de-referenced? can it be
incremented?</p>
<p>The answer depends on the underlying data structure of the
container. Figure <a href=
"#invalidation_guarantee_erase">Effect of erase in different
underlying data structures</a> shows three cases: A1 and A2
show a red-black tree; B1 and B2 show a probing hash-table; C1
and C2 show a collision-chaining hash table.</p>
<h6 class="c1"><a name="invalidation_guarantee_erase" id=
"invalidation_guarantee_erase"><img src=
"invalidation_guarantee_erase.png" alt="no image" /></a></h6>
<h6 class="c1">Effect of erase in different underlying
data structures.</h6>
<ol>
<li>Erasing 5 from A1 yields A2. Clearly, an iterator to 3
can be de-referenced and incremented. The sequence of
iterators changed, but in a way that is well-defined by the
<u>interface</u>.</li>
<li>Erasing 5 from B1 yields B2. Clearly, an iterator to 3 is
not valid at all - it cannot be de-referenced or incremented;
the order of iterators changed in a way that is (practically)
determined by the <u>implementation</u> and not by the
<u>interface</u>.</li>
<li>Erasing 5 from C1 yields C2. Here the situation is more
complicated. On the one hand, there is no problem in
de-referencing <tt>it</tt>. On the other hand, the order of
iterators changed in a way that is (practically) determined
by the <u>implementation</u> and not by the
<u>interface</u>.</li>
</ol>
<p>So in classic STL, it is not always possible to express
whether <tt>it</tt> is valid or not. This is true also for
<tt>insert</tt>, <i>e.g.</i>. Again, the iterator concept seems
overloaded.</p>
<h3><a name="assoc_methods" id="assoc_methods">Slightly
Different Methods</a></h3>
<p>[<a href="references.html#meyers02both">meyers02both</a>]
points out that a class's methods should comprise only
operations which depend on the class's internal structure;
other operations are best designed as external functions.
Possibly, therefore, the STL's associative containers lack some
useful methods, and provide some other methods which would be
better left out (<i>e.g.</i>, [<a href=
"references.html#sgi_stl">sgi_stl</a>] ).</p>
<h4><a name="assoc_ers_methods" id="assoc_ers_methods">Methods
Related to Erase</a></h4>
<ol>
<li>Order-preserving STL associative containers provide the
method
<pre>
iterator
erase
(iterator it)
</pre>which takes an iterator, erases the corresponding element,
and returns an iterator to the following element. Also hash-based
STL associative containers provide this method. This <u>seemingly
increases</u> genericity between associative containers, since, <i>
e.g.</i>, it is possible to use
<pre>
<b>typename</b> C::iterator it = c.begin();
<b>typename</b> C::iterator e_it = c.end();
<b>while</b>(it != e_it)
it = pred(*it)? c.erase(it) : ++it;
</pre>in order to erase from a container object <tt>
c</tt> all element which match a predicate <tt>pred</tt>.
However, in a different sense this actually
<u>decreases</u> genericity: an integral implication of
this method is that tree-based associative containers'
memory use is linear in the total number of elements they
store, while hash-based containers' memory use is unbounded
in the total number of elements they store. Assume a
hash-based container is allowed to decrease its size when
an element is erased. Then the elements might be rehashed,
which means that there is no "next" element - it is simply
undefined. Consequently, it is possible to infer from the
fact that STL hash-based containers provide this method
that they cannot downsize when elements are erased
(<a href="assoc_performance_tests.html#hash_based">Performance
Tests::Hash-Based Container Tests</a> quantifies this.) As
a consequence, different code is needed to manipulate
different containers, assuming that memory should be
conserved. <tt>pb_ds</tt>'s non-order preserving
associative containers omit this method.
</li>
<li>All of <tt>pb_ds</tt>'s associative containers include a
conditional-erase method
<pre>
<b>template</b>&lt;
<b>class</b> Pred&gt;
size_type
erase_if
(Pred pred)
</pre>which erases all elements matching a predicate. This is
probably the only way to ensure linear-time multiple-item erase
which can actually downsize a container.
</li>
<li>STL associative containers provide methods for
multiple-item erase of the form
<pre>
size_type
erase
(It b,
It e)
</pre>erasing a range of elements given by a pair of iterators. For
tree-based or trie-based containers, this can implemented more
efficiently as a (small) sequence of split and join operations. For
other, unordered, containers, this method isn't much better than an
external loop. Moreover, if <tt>c</tt> is a hash-based container,
then, <i>e.g.</i>, <tt>c.erase(c.find(2), c.find(5))</tt> is almost
certain to do something different than erasing all elements whose
keys are between 2 and 5, and is likely to produce other undefined
behavior.
</li>
</ol>
<h4><a name="assoc_split_join_methods" id=
"assoc_split_join_methods">Methods Related to Split and
Join</a></h4>
<p>It is well-known that tree-based and trie-based container
objects can be efficiently split or joined [<a href=
"references.html#clrs2001">clrs2001</a>]. Externally splitting
or joining trees is super-linear, and, furthermore, can throw
exceptions. Split and join methods, consequently, seem good
choices for tree-based container methods, especially, since as
noted just before, they are efficient replacements for erasing
sub-sequences. <a href=
"assoc_performance_tests.html#tree_like_based">Performance
Tests::Tree-Like-Based Container Tests</a> quantifies this.</p>
<h4><a name="assoc_insert_methods" id=
"assoc_insert_methods">Methods Related to Insert</a></h4>
<p>STL associative containers provide methods of the form</p>
<pre>
<b>template</b>&lt;
<b>class</b> It&gt;
size_type
insert
(It b,
It e);
</pre>for inserting a range of elements given by a pair of
iterators. At best, this can be implemented as an external loop,
or, even more efficiently, as a join operation (for the case of
tree-based or trie-based containers). Moreover, these methods seem
similar to constructors taking a range given by a pair of
iterators; the constructors, however, are transactional, whereas
the insert methods are not; this is possibly confusing.
<h4><a name="assoc_equiv_comp_methods" id=
"assoc_equiv_comp_methods">Functions Related to
Comparison</a></h4>
<p>Associative containers are parametrized by policies
allowing to test key equivalence; <i>e.g.</i> a hash-based
container can do this through its equivalence functor, and a
tree-based container can do this through its comparison
functor. In addition, some STL associative containers have
global function operators, <i>e.g.</i>,
<tt><b>operator</b>==</tt> and <tt><b>operator</b>&lt;=</tt>,
that allow comparing entire associative containers.</p>
<p>In our opinion, these functions are better left out. To
begin with, they do not significantly improve over an external
loop. More importantly, however, they are possibly misleading -
<tt><b>operator</b>==</tt>, for example, usually checks for
equivalence, or interchangeability, but the associative
container cannot check for values' equivalence, only keys'
equivalence; also, are two containers considered equivalent if
they store the same values in different order? this is an
arbitrary decision.</p>
<h3><a name="assoc_mapping_semantics" id=
"assoc_mapping_semantics">Alternative to Multiple Equivalent
Keys</a></h3>
<p>Maps (or sets) allow mapping (or storing) unique-key values.
The STL, however, also supplies associative containers which
map (or store) multiple values with equivalent keys:
<tt>std::multimap</tt>, <tt>std::multiset</tt>,
<tt>std::tr1::unordered_multimap</tt>, and
<tt>unordered_multiset</tt>. We first discuss how these might
be used, then why we think it is best to avoid them.</p>
<p>Suppose one builds a simple bank-account application that
records for each client (identified by an <tt>std::string</tt>)
and account-id (marked by an <tt><b>unsigned long</b></tt>) -
the balance in the account (described by a
<tt><b>float</b></tt>). Suppose further that ordering this
information is not useful, so a hash-based container is
preferable to a tree based container. Then one can use</p>
<pre>
std::tr1::unordered_map&lt;std::pair&lt;std::string, <b>unsigned long</b>&gt;, <b>float</b>, ...&gt;
</pre>which <u>hashes every combination of client and
account-id</u>. This might work well, except for the fact that it
is now impossible to efficiently list all of the accounts of a
specific client (this would practically require iterating over all
entries). Instead, one can use
<pre>
std::tr1::unordered_multimap&lt;std::pair&lt;std::string, <tt><b>unsigned long</b></tt>&gt;, <b>float</b>, ...&gt;
</pre>which <u>hashes every client</u>, and <u>decides equivalence
based on client</u> only. This will ensure that all accounts
belonging to a specific user are stored consecutively.
<p>Also, suppose one wants an integers' priority queue
(<i>i.e.,</i> a container that supports <tt>push</tt>,
<tt>pop</tt>, and <tt>top</tt> operations, the last of which
returns the largest <tt><b>int</b></tt>) that also supports
operations such as <tt>find</tt> and <tt>lower_bound</tt>. A
reasonable solution is to build an adapter over
<tt>std::set&lt;<b>int</b>&gt;</tt>. In this adapter,
<i>e.g.</i>, <tt>push</tt> will just call the tree-based
associative container's <tt>insert</tt> method; <tt>pop</tt>
will call its <tt>end</tt> method, and use it to return the
preceding element (which must be the largest). Then this might
work well, except that the container object cannot hold
multiple instances of the same integer (<tt>push(4)</tt>,
<i>e.g.</i>, will be a no-op if <tt>4</tt> is already in the
container object). If multiple keys are necessary, then one
might build the adapter over an
<tt>std::multiset&lt;<b>int</b>&gt;</tt>.</p>
<p class="c1">STL non-unique-mapping containers, then, are
useful when (1) a key can be decomposed in to a primary key and
a secondary key, (2) a key is needed multiple times, or (3) any
combination of (1) and (2).</p>
<p>Figure <a href="#embedded_lists_1">Non-unique mapping
containers in the STL's design</a> shows how the STL's design
works internally; in this figure nodes shaded equally represent
equivalent-key values. Equivalent keys are stored consecutively
using the properties of the underlying data structure: binary
search trees (Figure <a href="#embedded_lists_1">Non-unique
mapping containers in the STL's design</a>-A) store
equivalent-key values consecutively (in the sense of an
in-order walk) naturally; collision-chaining hash tables
(Figure <a href="#embedded_lists_1">Non-unique mapping
containers in the STL's design</a>-B) store equivalent-key
values in the same bucket, the bucket can be arranged so that
equivalent-key values are consecutive.</p>
<h6 class="c1"><a name="embedded_lists_1" id=
"embedded_lists_1"><img src="embedded_lists_1.png" alt=
"no image" /></a></h6>
<h6 class="c1">Non-unique mapping containers in the STL's
design.</h6>
<p>Put differently, STL non-unique mapping
associative-containers are associative containers that map
primary keys to linked lists that are embedded into the
container. Figure <a href="#embedded_lists_2">Effect of
embedded lists in STL multimaps</a> shows again the two
containers from Figure <a href="#embedded_lists_1">Non-unique
mapping containers in the STL's design</a>, this time with the
embedded linked lists of the grayed nodes marked
explicitly.</p>
<h6 class="c1"><a name="embedded_lists_2" id=
"embedded_lists_2"><img src="embedded_lists_2.png" alt=
"no image" /></a></h6>
<h6 class="c1">Effect of embedded lists in STL multimaps.</h6>
<p>These embedded linked lists have several disadvantages.</p>
<ol>
<li>The underlying data structure embeds the linked lists
according to its own consideration, which means that the
search path for a value might include several different
equivalent-key values. For example, the search path for the
the black node in either of Figures <a href=
"#embedded_lists_1">Non-unique mapping containers in the
STL's design</a> A or B, includes more than a single gray
node.</li>
<li>The links of the linked lists are the underlying
data structures' nodes, which typically are quite structured.
<i>E.g.</i>, in the case of tree-based containers (Figure
<a href="#embedded_lists_2">Effect of embedded lists in STL
multimaps</a>-B), each "link" is actually a node with three
pointers (one to a parent and two to children), and a
relatively-complicated iteration algorithm. The linked lists,
therefore, can take up quite a lot of memory, and iterating
over all values equal to a given key (<i>e.g.</i>, through
the return value of the STL's <tt>equal_range</tt>) can be
expensive.</li>
<li>The primary key is stored multiply; this uses more
memory.</li>
<li>Finally, the interface of this design excludes several
useful underlying data structures. <i>E.g.</i>, of all the
unordered self-organizing data structures, practically only
collision-chaining hash tables can (efficiently) guarantee
that equivalent-key values are stored consecutively.</li>
</ol>
<p>The above reasons hold even when the ratio of secondary keys
to primary keys (or average number of identical keys) is small,
but when it is large, there are more severe problems:</p>
<ol>
<li>The underlying data structures order the links inside
each embedded linked-lists according to their internal
considerations, which effectively means that each of the
links is unordered. Irrespective of the underlying
data structure, searching for a specific value can degrade to
linear complexity.</li>
<li>Similarly to the above point, it is impossible to apply
to the secondary keys considerations that apply to primary
keys. For example, it is not possible to maintain secondary
keys by sorted order.</li>
<li>While the interface "understands" that all equivalent-key
values constitute a distinct list (<i>e.g.</i>, through
<tt>equal_range</tt>), the underlying data structure
typically does not. This means, <i>e.g.</i>, that operations
such as erasing from a tree-based container all values whose
keys are equivalent to a a given key can be super-linear in
the size of the tree; this is also true also for several
other operations that target a specific list.</li>
</ol>
<p>In <tt>pb_ds</tt>, therefore, all associative containers map
(or store) unique-key values. One can (1) map primary keys to
secondary associative-containers (<i>i.e.</i>, containers of
secondary keys) or non-associative containers (2) map identical
keys to a size-type representing the number of times they
occur, or (3) any combination of (1) and (2). Instead of
allowing multiple equivalent-key values, <tt>pb_ds</tt>
supplies associative containers based on underlying
data structures that are suitable as secondary
associative-containers (see <a href=
"assoc_performance_tests.html#msc">Associative-Container
Performance Tests::Observations::Mapping-Semantics
Considerations</a>).</p>
<p>Figures <a href="#embedded_lists_3">Non-unique mapping
containers in <tt>pb_ds</tt></a> A and B show the equivalent
structures in <tt>pb_ds</tt>'s design, to those in Figures
<a href="#embedded_lists_1">Non-unique mapping containers in
the STL's design</a> A and B, respectively. Each shaded box
represents some size-type or secondary
associative-container.</p>
<h6 class="c1"><a name="embedded_lists_3" id=
"embedded_lists_3"><img src="embedded_lists_3.png" alt=
"no image" /></a></h6>
<h6 class="c1">Non-unique mapping containers in the
<tt>pb_ds</tt>.</h6>
<p>In the first example above, then, one would use an
associative container mapping each user to an associative
container which maps each application id to a start time (see
<a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/basic_multimap.cc"><tt>basic_multimap.cc</tt></a>);
in the second example, one would use an associative container
mapping each <tt><b>int</b></tt> to some size-type indicating
the number of times it logically occurs (see <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/ext/pb_ds/example/basic_multiset.cc"><tt>basic_multiset.cc</tt></a>).</p>
<p><a href=
"assoc_performance_tests.html#multimaps">Associative-Container
Performance Tests::Multimaps</a> quantifies some of these
points, and <a href=
"assoc_performance_tests.html#msc">Associative-Container
Performance Tests::Observations::Mapping-Semantics
Considerations</a> shows some simple calculations.</p>
<p><a href="assoc_examples.html#mmaps">Associative-Container
Examples::Multimaps</a> shows some simple examples of using
"multimaps".</p>
<p><a href="lu_based_containers.html">Design::Associative
Containers::List-Based Containers</a> discusses types of
containers especially suited as secondary
associative-containers.</p>
<h2><a name="pq" id="pq">Priority Queues</a></h2>
<h3><a name="pq_more_ops" id="pq_more_ops">Slightly Different
Methods</a></h3>
<p>Priority queues are containers that allow efficiently
inserting values and accessing the maximal value (in the sense
of the container's comparison functor); <i>i.e.</i>, their
interface supports <tt>push</tt> and <tt>pop</tt>. The STL's
priority queues indeed support these methods, but they support
little else. For algorithmic and software-engineering purposes,
other methods are needed:</p>
<ol>
<li>Many graph algorithms [<a href=
"references.html#clrs2001">clrs2001</a>] require increasing a
value in a priority queue (again, in the sense of the
container's comparison functor), or joining two
priority-queue objects.</li>
<li>It is sometimes necessary to erase an arbitrary value in
a priority queue. For example, consider the <tt>select</tt>
function for monitoring file descriptors:
<pre>
<b>int</b>
select
(<b>int</b> nfds,
fd_set *readfds,
fd_set *writefds,
fd_set *errorfds,
<b>struct</b> timeval *timeout);
</pre>then, as the <tt>select</tt> manual page [<a href=
"references.html#select_man">select_man</a>] states:
<p><q>The nfds argument specifies the range of file
descriptors to be tested. The select() function tests file
descriptors in the range of 0 to nfds-1.</q></p>
<p>It stands to reason, therefore, that we might wish to
maintain a minimal value for <tt>nfds</tt>, and priority
queues immediately come to mind. Note, though, that when a
socket is closed, the minimal file description might
change; in the absence of an efficient means to erase an
arbitrary value from a priority queue, we might as well
avoid its use altogether.</p>
<p><a href="pq_examples.html#xref">Priority-Queue
Examples::Cross-Referencing</a> shows examples for these
types of operations.</p>
</li>
<li>STL containers typically support iterators. It is
somewhat unusual for <tt>std::priority_queue</tt> to omit
them (see, <i>e.g.</i>, [<a href=
"references.html#meyers01stl">meyers01stl</a>]). One might
ask why do priority queues need to support iterators, since
they are self-organizing containers with a different purpose
than abstracting sequences. There are several reasons:
<ol>
<li>Iterators (even in self-organizing containers) are
useful for many purposes, <i>e.g.</i>, cross-referencing
containers, serialization, and debugging code that uses
these containers.</li>
<li>The STL's hash-based containers support iterators,
even though they too are self-organizing containers with
a different purpose than abstracting sequences.</li>
<li>In STL-like containers, it is natural to specify the
interface of operations for modifying a value or erasing
a value (discussed previously) in terms of a iterators.
This is discussed further in <a href=
"pq_design.html#pq_it">Design::Priority
Queues::Iterators</a>. It should be noted that the STL's
containers also use iterators for accessing and
manipulating a specific value. <i>E.g.</i>, in hash-based
containers, one checks the existence of a key by
comparing the iterator returned by <tt>find</tt> to the
iterator returned by <tt>end</tt>, and not by comparing a
pointer returned by <tt>find</tt> to <tt>NULL</tt>.</li>
</ol>
</li>
</ol>
<p><a href="pq_performance_tests.html">Performance
Tests::Priority Queues</a> quantifies some of these points.</p>
<h3><a name="pq_ds_genericity" id="pq_ds_genericity">More Data
Structures and Traits</a></h3>
<p>There are three main implementations of priority queues: the
first employs a binary heap, typically one which uses a
sequence; the second uses a tree (or forest of trees), which is
typically less structured than an associative container's tree;
the third simply uses an associative container. These are
shown, respectively, in Figures <a href=
"#pq_different_underlying_dss">Underlying Priority-Queue
Data-Structures</a> A1 and A2, B, and C.</p>
<h6 class="c1"><a name="pq_different_underlying_dss" id=
"pq_different_underlying_dss"><img src=
"pq_different_underlying_dss.png" alt="no image" /></a></h6>
<h6 class="c1">Underlying Priority-Queue Data-Structures.</h6>
<p>No single implementation can completely replace any of the
others. Some have better <tt>push</tt> and <tt>pop</tt>
amortized performance, some have better bounded (worst case)
response time than others, some optimize a single method at the
expense of others, <i>etc.</i>. In general the "best"
implementation is dictated by the problem (see <a href=
"pq_performance_tests.html#pq_observations">Performance
Tests::Priority Queues::Observations</a>).</p>
<p>As with associative containers (see <a href=
"#assoc_ds_genericity">Associative Containers::Traits for
Underlying Data-Structures</a>), the more implementations
co-exist, the more necessary a traits mechanism is for handling
generic containers safely and efficiently. This is especially
important for priority queues, since the invalidation
guarantees of one of the most useful data structures - binary
heaps - is markedly different than those of most of the
others.</p>
<p><a href="pq_design.html#pq_traits">Design::Priority
Queues::Traits</a> discusses this further.</p>
<h3><a name="pq_binary_heap" id="pq_binary_heap">Binary Heap
Implementation</a></h3>
<p>Binary heaps are one of the most useful underlying
data structures for priority queues. They are very efficient in
terms of memory (since they don't require per-value structure
metadata), and have the best amortized <tt>push</tt> and
<tt>pop</tt> performance for primitive types (<i>e.g.</i>,
<tt><b>int</b></tt>s).</p>
<p>The STL's <tt>priority_queue</tt> implements this data
structure as an adapter over a sequence, typically
<tt>std::vector</tt> or <tt>std::deque</tt>, which correspond
to Figures <a href="#pq_different_underlying_dss">Underlying
Priority-Queue Data-Structures</a> A1 and A2, respectively.</p>
<p>This is indeed an elegant example of the adapter concept and
the algorithm/container/iterator decomposition (see [<a href=
"references.html#nelson96stlpq">nelson96stlpql</a>]). There are
possibly reasons, however, why a binary-heap priority queue
would be better implemented as a container instead of a
sequence adapter:</p>
<ol>
<li><tt>std::priority_queue</tt> cannot erase values from its
adapted sequence (irrespective of the sequence type). This
means that the memory use of an <tt>std::priority_queue</tt>
object is always proportional to the maximal number of values
it ever contained, and not to the number of values that it
currently contains (see <a href=
"priority_queue_text_pop_mem_usage_test.html">Priority Queue
Text <tt>pop</tt> Memory Use Test</a>); this implementation
of binary heaps acts very differently than other underlying
data structures (<i>e.g.</i>, pairing heaps).</li>
<li>Some combinations of adapted sequences and value types
are very inefficient or just don't make sense. If one uses
<tt>std::priority_queue&lt;std::vector&lt;std::string&gt;
&gt; &gt;</tt>, for example, then not only will each
operation perform a logarithmic number of
<tt>std::string</tt> assignments, but, furthermore, any
operation (including <tt>pop</tt>) can render the container
useless due to exceptions. Conversely, if one uses
<tt>std::priority_queue&lt;std::deque&lt;<b>int</b>&gt; &gt;
&gt;</tt>, then each operation uses incurs a logarithmic
number of indirect accesses (through pointers) unnecessarily.
It might be better to let the container make a conservative
deduction whether to use the structure in Figures <a href=
"#pq_different_underlying_dss">Underlying Priority-Queue
Data-Structures</a> A1 or A2.</li>
<li>There does not seem to be a systematic way to determine
what exactly can be done with the priority queue.
<ol>
<li>If <tt>p</tt> is a priority queue adapting an
<tt>std::vector</tt>, then it is possible to iterate over
all values by using <tt>&amp;p.top()</tt> and
<tt>&amp;p.top() + p.size()</tt>, but this will not work
if <tt>p</tt> is adapting an <tt>std::deque</tt>; in any
case, one cannot use <tt>p.begin()</tt> and
<tt>p.end()</tt>. If a different sequence is adapted, it
is even more difficult to determine what can be
done.</li>
<li>If <tt>p</tt> is a priority queue adapting an
<tt>std::deque</tt>, then the reference return by
<tt>p.top()</tt> will remain valid until it is popped,
but if <tt>p</tt> adapts an <tt>std::vector</tt>, the
next <tt>push</tt> will invalidate it. If a different
sequence is adapted, it is even more difficult to
determine what can be done.</li>
</ol>
</li>
<li>Sequence-based binary heaps can still implement
linear-time <tt>erase</tt> and <tt>modify</tt> operations.
This means that if one needs, <i>e.g.</i>, to erase a small
(say logarithmic) number of values, then one might still
choose this underlying data structure. Using
<tt>std::priority_queue</tt>, however, this will generally
change the order of growth of the entire sequence of
operations.</li>
</ol>
</div>
</body>
</html>

View File

@ -1,194 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>move_to_front_lu_policy Interface</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1><tt>move_to_front_lu_policy</tt> Interface</h1>
<p>A list-update policy that unconditionally moves elements to
the front of the list.</p>
<p>Defined in: <a href=
"http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/list_update_policy.hpp"><tt>list_update_policy.hpp</tt></a></p>
<h2><a name="link1" id="link1">Template Parameters</a></h2>
<table class="c1" width="100%" border="1" summary=
"Template Parameters">
<tr>
<td width="20%" align="left"><b>Parameter</b></td>
<td width="50%" align="left"><b>Description</b></td>
<td width="30%" align="left"><b>Default Value</b></td>
</tr>
<tr>
<td>
<pre>
<a name="Allocator35940069" id=
"Allocator35940069"><b>class</b> Allocator </a>
</pre>
</td>
<td>
<p>Allocator type.</p>
<p>This is used only for definitions, e.g., the size
type.</p>
</td>
<td>
<pre>
std::allocator&lt;<b>char</b>&gt;
</pre>
</td>
</tr>
</table>
<h2><a name="link2" id="link2">Public Types and
Constants</a></h2>
<h3><a name="link3" id="link3">Policy Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="allocator48440069" id="allocator48440069">allocator</a>
</pre>
</td>
<td>
<pre>
<a href="#Allocator35940069"><tt>Allocator</tt></a>
</pre>
</td>
<td>
<p><a href="#Allocator35940069"><tt>Allocator</tt></a>
type.</p>
</td>
</tr>
</table>
<h3><a name="link4" id="link4">Metadata-Type
Definitions</a></h3>
<table class="c1" width="100%" border="1" summary="Types">
<tr>
<td width="30%" align="left"><b>Type</b></td>
<td width="55%" align="left"><b>Definition</b></td>
<td width="15%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a name="metadata_type2849297114" id=
"metadata_type2849297114">metadata_type</a>
</pre>
</td>
<td>
<pre>
<a href="null_lu_metadata.html"><span class=
"c2"><tt>null_lu_metadata</tt></span></a>
</pre>
</td>
<td>
<p>Metadata on which this functor operates.</p>
<p>In this case, none.</p>
</td>
</tr>
<tr>
<td>
<pre>
<a name="metadata_reference583863863" id=
"metadata_reference583863863">metadata_reference</a>
</pre>
</td>
<td>
<pre>
<b>typename</b> <a href=
"#Allocator35940069"><tt>Allocator</tt></a>::<b>template</b> rebind&lt;
<a href=
"#metadata_type2849297114"><tt>metadata_type</tt></a>&gt;::other::reference
</pre>
</td>
<td>
<p>Reference to metadata on which this functor
operates.</p>
</td>
</tr>
</table>
<h2><a name="link5" id="link5">Public Methods</a></h2>
<h3><a name="link6" id="link6">Metadata Methods</a></h3>
<table class="c1" width="100%" border="1" summary="Methods">
<tr>
<td width="45%" align="left"><b>Method</b></td>
<td width="55%" align="left"><b>Description</b></td>
</tr>
<tr>
<td>
<pre>
<a href="#metadata_type2849297114"><tt>metadata_type</tt></a>
<b>operator</b>()
() <b>const</b>
</pre>
</td>
<td>
<p>Creates a metadata object.</p>
</td>
</tr>
<tr>
<td>
<pre>
<b>inline</b> <b>bool</b>
<b>operator</b>()
(<a href=
"#metadata_reference583863863"><tt>metadata_reference</tt></a> r_metadata) <b>const</b>
</pre>
</td>
<td>
<p>Decides whether a metadata object should be moved to
the front of the list.</p>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,215 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
<title>"Multimap" Text Find Timing Test with Large Average
Secondary-Key to Primary-Key Ratio</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<div id="page">
<h1>"Multimap" Text Find Timing Test with Large Average
Secondary-Key to Primary-Key Ratio</h1>
<h2><a name="description" id="description">Description</a></h2>
<p>This test inserts a number of pairs into a container. The
first item of each pair is a string from an arbitrary text
[<a href="references.html#wickland96thirty">wickland96thirty</a>], and
the second is a uniform i.i.d.integer. The container is a
"multimap" - it considers the first member of each pair as a
primary key, and the second member of each pair as a secondary
key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
Containers::Alternative to Multiple Equivalent Keys</a>). There
are 100 distinct primary keys, and the ratio of secondary keys
to primary keys ranges to about 20.</p>
<p>The test measures the average find-time as a function of the
number of values inserted. For <tt>pb_ds</tt>'s containers, it
finds the secondary key from a container obtained from finding
a primary key. For the native multimaps, it searches a range
obtained using <tt>std::equal_range</tt> on a primary key.</p>
<p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/multimap_text_find_timing_large.cc"><tt>multimap_text_find_timing_test</tt></a>
thirty_years_among_the_dead_preproc.txt 100 3 4 4)</p>
<h2><a name="purpose" id="purpose">Purpose</a></h2>
<p>The test checks the find-time scalability of different
"multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
Containers::Mapping Semantics</a>).</p>
<h2><a name="results" id="results">Results</a></h2>
<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
<a href="#NTL">NTL</a> show the results for "multimaps" which
use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
<a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
"multimaps" which use a hash-based container for primary keys,
in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
<a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
respectively.</p>
<div id="NTG_res_div">
<div id="NTG_gcc">
<div id="NTG_multimap_text_find_timing_test_large_s2p_tree">
<div id="NTG_assoc">
<div id="NTG_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_find_timing_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_mmap-
<tt>std::multimap</tt></li>
<li>
rb_tree_mmap_lu_mtf_set-
<a href="tree.html"><tt>tree</tt></a>
with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
</li>
<li>
rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="tree.html"><tt>tree</tt></a>
with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NTM_res_div">
<div id="NTM_msvc">
<div id="NTM_multimap_text_find_timing_test_large_s2p_tree">
<div id="NTM_assoc">
<div id="NTM_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_find_timing_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_mmap-
<tt>std::multimap</tt></li>
<li>
rb_tree_mmap_lu_mtf_set-
<a href="tree.html"><tt>tree</tt></a>
with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
</li>
<li>
rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="tree.html"><tt>tree</tt></a>
with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NTL_res_div">
<div id="NTL_local">
<div id="NTL_multimap_text_find_timing_test_large_s2p_tree">
<div id="NTL_assoc">
<div id="NTL_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_find_timing_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHG_res_div">
<div id="NHG_gcc">
<div id="NHG_multimap_text_find_timing_test_large_s2p_hash">
<div id="NHG_assoc">
<div id="NHG_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_find_timing_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_mmap-
<tt>__gnucxx::hash_multimap</tt></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
</li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHM_res_div">
<div id="NHM_msvc">
<div id="NHM_multimap_text_find_timing_test_large_s2p_hash">
<div id="NHM_assoc">
<div id="NHM_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_find_timing_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
<ol>
<li>
n_hash_mmap-
<tt>stdext::hash_multimap</tt></li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
</li>
<li>
cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
</ol>
</div><div style="width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<div id="NHL_res_div">
<div id="NHL_local">
<div id="NHL_multimap_text_find_timing_test_large_s2p_hash">
<div id="NHL_assoc">
<div id="NHL__Native_and_primary_hash-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_find_timing_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
</div>
</div>
</div>
</div>
<h2><a name="observations" id="observations">Observations</a></h2>
<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
Considerations</a>.</p>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Some files were not shown because too many files have changed in this diff Show More