aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/docs/html/ext/pb_assoc/examples.html
blob: af20aad5072aa2a4dd7f3b8187a05bd7abdcf25b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Examples</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body bgcolor = "white">
<h1>Examples</h1>

<ol>
	<li><a href = "#basic_usage">Basic use</a></li>
	<li><a href = "#generics">Generics</a></li>
	<li><a href = "#hash_based">Hash-Based Containers</a></li>
	<li><a href = "#tree_based">Tree-Based Containers</a></li>
</ol>

<h2><a name = "basic_usage">Basic Use</a></h2>

<ol>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/basic_map.cc"><tt>basic_map.cc</tt></a>- Basic use of &quot;maps&quot;.</li>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/basic_set.cc"><tt>basic_set.cc</tt></a>- Basic use of &quot;sets&quot;.
See
<a href = "ms_gen.html#ds_policy">Mapping Semantics::Data Types as a Policy</a>.
	</li>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/basic_multimap.cc"><tt>basic_multimap.cc</tt></a>- Basic use of &quot;multimaps&quot;.
See
	<a href = "ms_gen.html#ds_policy">Mapping Semantics::Data Types as a Policy</a>.
	</li>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/erase_if.cc"><tt>erase_if.cc</tt></a>- Conditionally
erasing values from a container object.
See
<a href = "motivation.html#methods">Motivation::Choice of Methods</a>.
	</li>
</ol>



<h2><a name = "generics">Generics</a></h2>

<ol>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/ds_traits.cc"><tt>ds_traits.cc</tt></a>-
Using
<a href = "ds_traits.html"><tt>ds_traits</tt></a> to query about underlying
data-structure behaviour.
See
<a href = "ds_gen.html#ds_traits">Data-Structure Genericity::Data-Structure Tags and Traits</a>.
	</li>
	<li> <a href = "../../../../testsuite/ext/pb_assoc/example/mapping_level.cc"><tt>mapping_level.cc</tt></a>-
Rebinding a compound associative-container to different mapping levels.
See
<a href = "ms_gen.html#mapping_level">Mapping-Semantics::Mapping Levels</a>.
	</li>
	<li> <a href = "../../../../testsuite/ext/pb_assoc/example/ms_traits.cpp"><tt>ms_traits.cpp</tt></a>-
Using <a href = "ms_traits.html"><tt>ms_traits</tt></a>
to query about mapping semantics.
See
<a href = "ms_gen.html#ms_traits">Mapping-Semantics::Tags and Traits</a>.
	</li>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/cc_ht_extract_key.cc"><tt>cc_ht_extract_key.cc</tt></a>-
		Extracting the key from different types.
	</li>
</ol>


<h2><a name = "hash_based">Hash-Based Containers</a></h2>

<p>
	See
<a href = "hash_based_containers.html">Hash-Based Containers</a>.
</p>

<h3>General</h3>

<ol>
	<li>
	<a href = "../../../../testsuite/ext/pb_assoc/example/hash_bad_find.cc"><tt>hash_bad_find.cc</tt></a>-
	A non-compiling example showing wrong use of finding keys in hash-based
	containers.
	See
	<a href = "ds_gen.html#find_range">Data-Structure Genericity::Find-Type and Range-Type Methods and Iterators</a>.
	</li>
</ol>


<h3>Resize-Related</h3>

<p>See
	<a href = "../../../../testsuite/ext/pb_assoc/example/hash_based_containers.html#resize_policies">Hash-Based Containers::Resize Policies</a>.
</p>

<ol>
	<li>
	<a href = "../../../../testsuite/ext/pb_assoc/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 = "../../../../testsuite/ext/pb_assoc/example/hash_bad_resize.cc"><tt>hash_bad_resize.cc</tt></a>-
	A non-compiling example showing how not to resize a hash-based container object.
	</li>
	<li>
	<a href = "../../../../testsuite/ext/pb_assoc/example/hash_resize.cc"><tt>hash_resize.cc</tt></a>-
	Resizing the size of a hash-based container object.
	</li>
	<li><a href = "../../../../testsuite/ext/pb_assoc/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 = "../../../../testsuite/ext/pb_assoc/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>Hash-Related</h3>

<p>See
	<a href = "../../../../testsuite/ext/pb_assoc/example/hash_based_containers.html#hash_policies">Hash-Based Containers::Hash Policies</a>.
</p>

<ol>
	<li>
	<a href = "../../../../testsuite/ext/pb_assoc/example/hash_mod.cc"><tt>hash_mod.cc</tt></a>-
Using a modulo range-hashing function.
	</li>
	<li>
	<a href = "../../../../testsuite/ext/pb_assoc/example/store_hash.cc"><tt>store_hash.cc</tt></a>-
	Storing the hash value along with each key.
	</li>
	<li>
	<a href = "../../../../testsuite/ext/pb_assoc/example/shift_mask.cc"><tt>shift_mask.cc</tt></a>-
	Writing a range-hashing functor.
	</li>
	<li><a href = "../../../../testsuite/ext/pb_assoc/example/ranged_hash.cc"><tt>ranged_hash.cc</tt></a>-
	Writing
	a ranged-hash functor.</li>
</ol>





<h2><a name = "tree_based">Tree-Based Containers</a></h2>

<p>
	See
<a href = "tree_based_containers.html">Tree-Based Containers</a>.
</p>

<h3>Node-Invariatns</h3>

<p>
	See
<a href = "tree_based_containers.html#invariants">Tree-Based Containers::Node Invariants</a>.
</p>

<ol>
	<li><a href="../../../../testsuite/ext/pb_assoc/example/tree_order_statistics.cc"><tt>tree_order_statistics.cc</tt></a>-
Using trees for order statistics.
	</li>
	<li><a href="../../../../testsuite/ext/pb_assoc/example/tree_intervals.cc"><tt>tree_intervals.cc</tt></a>- Augmenting an
<a href = "ov_tree_set.html"><tt>ov_tree_set</tt></a>
to support operations on line intervals.
	</li>
</ol>

<h3>Split and Join</h3>

<p>
	See
<a href = "tree_based_containers.html#add_methods">Tree-Based Containers::Additional Types and Methods</a>.
</p>

<ol>
	<li><a href="../../../../testsuite/ext/pb_assoc/example/tree_join.cc"><tt>tree_join.cc</tt></a>- Joining
two tree-based container objects.
	</li>
	<li><a href="../../../../testsuite/ext/pb_assoc/example/tree_split.cc"><tt>tree_split.cc</tt></a>- Splitting
a tree-based container object.
	</li>
	<li><a href="../../../../testsuite/ext/pb_assoc/example/tree_order_statistics_join.cc"><tt>tree_order_statistics_join.cc</tt></a>- Order statistics while joining two tree-based container objects.
</ol>

</body>
</html>