File: PetscHSetT.html

package info (click to toggle)
petsc 3.14.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 266,472 kB
  • sloc: ansic: 680,898; python: 33,303; cpp: 16,324; makefile: 14,022; f90: 13,731; javascript: 10,713; fortran: 9,581; sh: 1,373; xml: 619; objc: 445; csh: 192; pascal: 148; java: 13
file content (294 lines) | stat: -rw-r--r-- 12,132 bytes parent folder | download
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscHSetT.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscHSetT</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.14.5 2021-03-03</b></div>
   <div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.14.5 v3.14.5 docs/manualpages/Sys/PetscHSetT.html "><small>Report Typos and Errors</small></a></div>
<A NAME="PetscHSetT"><H1>PetscHSetT</H1></A>
Hash table set 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
/*MC
  <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A> - Create a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> *ht)

  Output Parameter:
. ht - The hash table

  

.seealso: <A HREF="../Sys/PetscHSetTDestroy.html#PetscHSetTDestroy">PetscHSetTDestroy</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTDestroy.html#PetscHSetTDestroy">PetscHSetTDestroy</A> - Destroy a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTDestroy.html#PetscHSetTDestroy">PetscHSetTDestroy</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> *ht)

  Input Parameter:
. ht - The hash table

  

.seealso: <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTReset.html#PetscHSetTReset">PetscHSetTReset</A> - Reset a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTReset.html#PetscHSetTReset">PetscHSetTReset</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht)

  Input Parameter:
. ht - The hash table

  

.seealso: <A HREF="../Sys/PetscHSetTClear.html#PetscHSetTClear">PetscHSetTClear</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTDuplicate.html#PetscHSetTDuplicate">PetscHSetTDuplicate</A> - Duplicate a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTDuplicate.html#PetscHSetTDuplicate">PetscHSetTDuplicate</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> *hd)

  Input Parameter:
. ht - The source hash table

  Output Parameter:
. ht - The duplicated hash table

  

.seealso: <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTUpdate.html#PetscHSetTUpdate">PetscHSetTUpdate</A> - Add entries from a hash table to another

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTUpdate.html#PetscHSetTUpdate">PetscHSetTUpdate</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> hda)

  Input Parameter:
+ ht - The hash table to which elements are added
- hta - The hash table from which the elements are retrieved

  Output Parameter:
. ht - The hash table filled with the elements from the other hash table

  

.seealso: <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A>(), <A HREF="../Sys/PetscHSetTDuplicate.html#PetscHSetTDuplicate">PetscHSetTDuplicate</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTClear.html#PetscHSetTClear">PetscHSetTClear</A> - Clear a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTClear.html#PetscHSetTClear">PetscHSetTClear</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht)

  Input Parameter:
. ht - The hash table

  

.seealso: <A HREF="../Sys/PetscHSetTReset.html#PetscHSetTReset">PetscHSetTReset</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTResize.html#PetscHSetTResize">PetscHSetTResize</A> - Set the number of buckets in a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTResize.html#PetscHSetTResize">PetscHSetTResize</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> nb)

  Input Parameters:
+ ht - The hash table
- nb - The number of buckets

  

.seealso: <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTGetSize.html#PetscHSetTGetSize">PetscHSetTGetSize</A> - Get the number of entries in a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTGetSize.html#PetscHSetTGetSize">PetscHSetTGetSize</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> *n)

  Input Parameter:
. ht - The hash table

  Output Parameter:
. n - The number of entries

  

.seealso: <A HREF="../Sys/PetscHSetTResize.html#PetscHSetTResize">PetscHSetTResize</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTGetCapacity.html#PetscHSetTGetCapacity">PetscHSetTGetCapacity</A> - Get the current size of the array in the hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTGetCapacity.html#PetscHSetTGetCapacity">PetscHSetTGetCapacity</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> *n)

  Input Parameter:
. ht - The hash table

  Output Parameter:
. n - The capacity

  

.seealso: <A HREF="../Sys/PetscHSetTResize.html#PetscHSetTResize">PetscHSetTResize</A>(), <A HREF="../Sys/PetscHSetTGetSize.html#PetscHSetTGetSize">PetscHSetTGetSize</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTHas.html#PetscHSetTHas">PetscHSetTHas</A> - Query for an entry in the hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTHas.html#PetscHSetTHas">PetscHSetTHas</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,KeyType key,<A HREF="../Sys/PetscBool.html#PetscBool">PetscBool</A> *has)

  Input Parameters:
+ ht  - The hash table
- key - The entry

  Output Parameter:
. has - Boolean indicating whether the entry is in the hash table

  

.seealso:  <A HREF="../Sys/PetscHSetTAdd.html#PetscHSetTAdd">PetscHSetTAdd</A>(), <A HREF="../Sys/PetscHSetTDel.html#PetscHSetTDel">PetscHSetTDel</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTAdd.html#PetscHSetTAdd">PetscHSetTAdd</A> - Set an entry in the hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTAdd.html#PetscHSetTAdd">PetscHSetTAdd</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,KeyType key)

  Input Parameters:
+ ht  - The hash table
- key - The entry

  

.seealso: <A HREF="../Sys/PetscHSetTDel.html#PetscHSetTDel">PetscHSetTDel</A>(), <A HREF="../Sys/PetscHSetTHas.html#PetscHSetTHas">PetscHSetTHas</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTDel.html#PetscHSetTDel">PetscHSetTDel</A> - Remove an entry from the hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTDel.html#PetscHSetTDel">PetscHSetTDel</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,KeyType key)

  Input Parameters:
+ ht  - The hash table
- key - The entry

  

.seealso: <A HREF="../Sys/PetscHSetTAdd.html#PetscHSetTAdd">PetscHSetTAdd</A>(), <A HREF="../Sys/PetscHSetTHas.html#PetscHSetTHas">PetscHSetTHas</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTQueryAdd.html#PetscHSetTQueryAdd">PetscHSetTQueryAdd</A> - Query and add an entry in the hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTQueryAdd.html#PetscHSetTQueryAdd">PetscHSetTQueryAdd</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,KeyType key,<A HREF="../Sys/PetscBool.html#PetscBool">PetscBool</A> *missing)

  Input Parameters:
+ ht  - The hash table
- key - The entry

  Output Parameter:
. missing - Boolean indicating whether the entry was missing

  

.seealso: <A HREF="../Sys/PetscHSetTQueryDel.html#PetscHSetTQueryDel">PetscHSetTQueryDel</A>(), <A HREF="../Sys/PetscHSetTAdd.html#PetscHSetTAdd">PetscHSetTAdd</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTQueryDel.html#PetscHSetTQueryDel">PetscHSetTQueryDel</A> - Query and remove an entry from the hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTQueryDel.html#PetscHSetTQueryDel">PetscHSetTQueryDel</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,KeyType key,<A HREF="../Sys/PetscBool.html#PetscBool">PetscBool</A> *present)

  Input Parameters:
+ ht  - The hash table
- key - The entry

  Output Parameter:
. present - Boolean indicating whether the entry was present

  

.seealso: <A HREF="../Sys/PetscHSetTQueryAdd.html#PetscHSetTQueryAdd">PetscHSetTQueryAdd</A>(), <A HREF="../Sys/PetscHSetTDel.html#PetscHSetTDel">PetscHSetTDel</A>()
M*/

/*MC
  <A HREF="../Sys/PetscHSetTGetElems.html#PetscHSetTGetElems">PetscHSetTGetElems</A> - Get all entries from a hash table

  Synopsis:
  #include &lt;petsc/private/hashset.h&gt;
  <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Sys/PetscHSetTGetElems.html#PetscHSetTGetElems">PetscHSetTGetElems</A>(<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A> ht,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> *off,KeyType array[])

  Input Parameters:
+ ht    - The hash table
. off   - Input offset in array (usually zero)
- array - Array where to put hash table entries into

  Output Parameter:
+ off   - Output offset in array (output offset = input offset + hash table size)
- array - Array filled with the hash table entries

  

.seealso: <A HREF="../Sys/PetscHSetTGetSize.html#PetscHSetTGetSize">PetscHSetTGetSize</A>()
M*/

#define <A HREF="../Sys/PETSC_HASH_SET.html#PETSC_HASH_SET">PETSC_HASH_SET</A>(HashT, KeyType, HashFunc, EqualFunc)                                          \
                                                                                                     \
KHASH_INIT(HashT, KeyType, char, 0, HashFunc, EqualFunc)                                             \
                                                                                                     \
typedef khash_t(HashT) *Pet.c.html##HashT;
</PRE>
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
typedef khash_t(HSetT) *<A HREF="../Sys/PetscHSetT.html#PetscHSetT">PetscHSetT</A>;
</PRE>
<P>

<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
  <A HREF="../Sys/PETSC_HASH_SET.html#PETSC_HASH_SET">PETSC_HASH_SET</A>(), <A HREF="../Sys/PetscHSetTCreate.html#PetscHSetTCreate">PetscHSetTCreate</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>developer<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../include/petsc/private/hashset.h.html#PetscHSetT">include/petsc/private/hashset.h</A>
<BR><A HREF="./index.html">Index of all Sys routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>