Actual source code: generated_khash.h

  1:  /* SUBMANSEC = PetscH */ 

  3: This file is processed by make allmanpages in $PETSC_DIR/makefile to create manual pages
  4: for the types and macros created by PETSC_HASH_SET(). For example, PetscHSetIJ.

  6: /*S
  7:   PetscHSetI - Hash set with a key of <Type>

  9:   Level: developer

 11: .seealso: `PETSC_HASH_SET()`, `PetscHSetICreate()`, `PetscHSetIDestroy()`, `PetscHSetIQueryAdd()`, `PetscHSetIDel()`,
 12:           `PetscHSetIAdd()`, PetscHSetIReset()`
 13: S*/
 14: typedef struct _PetscHashI PetscHSetI;

 16: /*MC
 17:   PetscHSetICreate - Create a hash set

 19:   Synopsis:
 20: #include <petsc/private/hashseti.h>
 21:   PetscErrorCode PetscHSetICreate(PetscHSetI *ht)

 23:   Output Parameter:
 24: . ht - The hash set

 26:   Level: developer

 28: .seealso: `PetscHSetIDestroy()`
 29: M*/

 31: /*MC
 32:   PetscHSetIDestroy - Destroy a hash set

 34:   Synopsis:
 35: #include <petsc/private/hashseti.h>
 36:   PetscErrorCode PetscHSetIDestroy(PetscHSetI *ht)

 38:   Input Parameter:
 39: . ht - The hash set

 41:   Level: developer

 43: .seealso: `PetscHSetICreate()`
 44: M*/

 46: /*MC
 47:   PetscHSetIReset - Reset a hash set

 49:   Synopsis:
 50: #include <petsc/private/hashseti.h>
 51:   PetscErrorCode PetscHSetIReset(PetscHSetI ht)

 53:   Input Parameter:
 54: . ht - The hash set

 56:   Level: developer

 58: .seealso: `PetscHSetIClear()`
 59: M*/

 61: /*MC
 62:   PetscHSetIDuplicate - Duplicate a hash set

 64:   Synopsis:
 65: #include <petsc/private/hashseti.h>
 66:   PetscErrorCode PetscHSetIDuplicate(PetscHSetI ht,PetscHSetI *hd)

 68:   Input Parameter:
 69: . ht - The source hash set

 71:   Output Parameter:
 72: . ht - The duplicated hash set

 74:   Level: developer

 76: .seealso: `PetscHSetICreate()`
 77: M*/

 79: /*MC
 80:   PetscHSetIUpdate - Add entries from a has set to another

 82:   Synopsis:
 83: #include <petsc/private/hashseti.h>
 84:   PetscErrorCode PetscHSetIUpdate(PetscHSetI ht,PetscHSetI hda)

 86:   Input Parameters:
 87: + ht - The hash set to which elements are added
 88: - hta - The hash set from which the elements are retrieved

 90:   Output Parameter:
 91: . ht - The hash set filled with the elements from the other hash set

 93:   Level: developer

 95: .seealso: `PetscHSetICreate()`, `PetscHSetIDuplicate()`
 96: M*/

 98: /*MC
 99:   PetscHSetIClear - Clear a hash set

101:   Synopsis:
102: #include <petsc/private/hashseti.h>
103:   PetscErrorCode PetscHSetIClear(PetscHSetI ht)

105:   Input Parameter:
106: . ht - The hash set

108:   Level: developer

110: .seealso: `PetscHSetIReset()`
111: M*/

113: /*MC
114:   PetscHSetIResize - Set the number of buckets in a hash set

116:   Synopsis:
117: #include <petsc/private/hashseti.h>
118:   PetscErrorCode PetscHSetIResize(PetscHSetI ht,PetscInt nb)

120:   Input Parameters:
121: + ht - The hash set
122: - nb - The number of buckets

124:   Level: developer

126: .seealso: `PetscHSetICreate()`
127: M*/

129: /*MC
130:   PetscHSetIGetSize - Get the number of entries in a hash set

132:   Synopsis:
133: #include <petsc/private/hashseti.h>
134:   PetscErrorCode PetscHSetIGetSize(PetscHSetI ht,PetscInt *n)

136:   Input Parameter:
137: . ht - The hash set

139:   Output Parameter:
140: . n - The number of entries

142:   Level: developer

144: .seealso: `PetscHSetIResize()`
145: M*/

147: /*MC
148:   PetscHSetIGetCapacity - Get the current size of the array in the hash set

150:   Synopsis:
151: #include <petsc/private/hashseti.h>
152:   PetscErrorCode PetscHSetIGetCapacity(PetscHSetI ht,PetscInt *n)

154:   Input Parameter:
155: . ht - The hash set

157:   Output Parameter:
158: . n - The capacity

160:   Level: developer

162: .seealso: `PetscHSetIResize()`, `PetscHSetIGetSize()`
163: M*/

165: /*MC
166:   PetscHSetIHas - Query for an entry in the hash set

168:   Synopsis:
169: #include <petsc/private/hashseti.h>
170:   PetscErrorCode PetscHSetIHas(PetscHSetI ht, PetscInt key, PetscBool *has)

172:   Input Parameters:
173: + ht  - The hash set
174: - key - The entry

176:   Output Parameter:
177: . has - Boolean indicating whether the entry is in the hash set

179:   Level: developer

181: .seealso: `PetscHSetIAdd()`, `PetscHSetIDel()`, `PetscHSetIQueryAdd()`
182: M*/

184: /*MC
185:   PetscHSetIAdd - Set an entry in the hash set

187:   Synopsis:
188: #include <petsc/private/hashseti.h>
189:   PetscErrorCode PetscHSetIAdd(PetscHSetI ht, PetscInt key)

191:   Input Parameters:
192: + ht  - The hash set
193: - key - The entry

195:   Level: developer

197: .seealso: `PetscHSetIDel()`, `PetscHSetIHas()`, `PetscHSetIQueryAdd()`
198: M*/

200: /*MC
201:   PetscHSetIDel - Remove an entry from the hash set

203:   Synopsis:
204: #include <petsc/private/hashseti.h>
205:   PetscErrorCode PetscHSetIDel(PetscHSetI ht, PetscInt key)

207:   Input Parameters:
208: + ht  - The hash set
209: - key - The entry

211:   Level: developer

213: .seealso: `PetscHSetIAdd()`, `PetscHSetIHas()`
214: M*/

216: /*MC
217:   PetscHSetIQueryAdd - Query and add an entry in the hash set

219:   Synopsis:
220: #include <petsc/private/hashseti.h>
221:   PetscErrorCode PetscHSetIQueryAdd(PetscHSetI ht, PetscInt key, PetscBool *missing)

223:   Input Parameters:
224: + ht  - The hash set
225: - key - The entry

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

230:   Level: developer

232: .seealso: `PetscHSetIQueryDel()`, `PetscHSetIAdd()`, `PetscHSetIHas()`
233: M*/

235: /*MC
236:   PetscHSetIQueryDel - Query and remove an entry from the hash set

238:   Synopsis:
239: #include <petsc/private/hashseti.h>
240:   PetscErrorCode PetscHSetIQueryDel(PetscHSetI ht, PetscInt key, PetscBool *present)

242:   Input Parameters:
243: + ht  - The hash set
244: - key - The entry

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

249:   Level: developer

251: .seealso: `PetscHSetIQueryAdd()`, `PetscHSetIDel()`
252: M*/

254: /*MC
255:   PetscHSetIGetElems - Get all entries from a hash set

257:   Synopsis:
258: #include <petsc/private/hashseti.h>
259:   PetscErrorCode PetscHSetIGetElems(PetscHSetI ht, PetscInt *off, PetscInt array[])

261:   Input Parameters:
262: + ht    - The hash set
263: . off   - Input offset in array (usually zero)
264: - array - Array where to put hash set entries into

266:   Output Parameters:
267: + off   - Output offset in array (output offset = input offset + hash set size)
268: - array - Array filled with the hash set entries

270:   Level: developer

272: .seealso: `PetscHSetIGetSize()`
273: M*/

275: This file is processed by make allmanpages in $PETSC_DIR/makefile to create manual pages
276: for the types and macros created by PETSC_HASH_SET(). For example, PetscHSetIJ.

278: /*S
279:   PetscHSetIJ - Hash set with a key of <Type>

281:   Level: developer

283: .seealso: `PETSC_HASH_SET()`, `PetscHSetIJCreate()`, `PetscHSetIJDestroy()`, `PetscHSetIJQueryAdd()`, `PetscHSetIJDel()`,
284:           `PetscHSetIJAdd()`, PetscHSetIJReset()`
285: S*/
286: typedef struct _PetscHashIJ PetscHSetIJ;

288: /*MC
289:   PetscHSetIJCreate - Create a hash set

291:   Synopsis:
292: #include <petsc/private/hashsetij.h>
293:   PetscErrorCode PetscHSetIJCreate(PetscHSetIJ *ht)

295:   Output Parameter:
296: . ht - The hash set

298:   Level: developer

300: .seealso: `PetscHSetIJDestroy()`
301: M*/

303: /*MC
304:   PetscHSetIJDestroy - Destroy a hash set

306:   Synopsis:
307: #include <petsc/private/hashsetij.h>
308:   PetscErrorCode PetscHSetIJDestroy(PetscHSetIJ *ht)

310:   Input Parameter:
311: . ht - The hash set

313:   Level: developer

315: .seealso: `PetscHSetIJCreate()`
316: M*/

318: /*MC
319:   PetscHSetIJReset - Reset a hash set

321:   Synopsis:
322: #include <petsc/private/hashsetij.h>
323:   PetscErrorCode PetscHSetIJReset(PetscHSetIJ ht)

325:   Input Parameter:
326: . ht - The hash set

328:   Level: developer

330: .seealso: `PetscHSetIJClear()`
331: M*/

333: /*MC
334:   PetscHSetIJDuplicate - Duplicate a hash set

336:   Synopsis:
337: #include <petsc/private/hashsetij.h>
338:   PetscErrorCode PetscHSetIJDuplicate(PetscHSetIJ ht,PetscHSetIJ *hd)

340:   Input Parameter:
341: . ht - The source hash set

343:   Output Parameter:
344: . ht - The duplicated hash set

346:   Level: developer

348: .seealso: `PetscHSetIJCreate()`
349: M*/

351: /*MC
352:   PetscHSetIJUpdate - Add entries from a has set to another

354:   Synopsis:
355: #include <petsc/private/hashsetij.h>
356:   PetscErrorCode PetscHSetIJUpdate(PetscHSetIJ ht,PetscHSetIJ hda)

358:   Input Parameters:
359: + ht - The hash set to which elements are added
360: - hta - The hash set from which the elements are retrieved

362:   Output Parameter:
363: . ht - The hash set filled with the elements from the other hash set

365:   Level: developer

367: .seealso: `PetscHSetIJCreate()`, `PetscHSetIJDuplicate()`
368: M*/

370: /*MC
371:   PetscHSetIJClear - Clear a hash set

373:   Synopsis:
374: #include <petsc/private/hashsetij.h>
375:   PetscErrorCode PetscHSetIJClear(PetscHSetIJ ht)

377:   Input Parameter:
378: . ht - The hash set

380:   Level: developer

382: .seealso: `PetscHSetIJReset()`
383: M*/

385: /*MC
386:   PetscHSetIJResize - Set the number of buckets in a hash set

388:   Synopsis:
389: #include <petsc/private/hashsetij.h>
390:   PetscErrorCode PetscHSetIJResize(PetscHSetIJ ht,PetscInt nb)

392:   Input Parameters:
393: + ht - The hash set
394: - nb - The number of buckets

396:   Level: developer

398: .seealso: `PetscHSetIJCreate()`
399: M*/

401: /*MC
402:   PetscHSetIJGetSize - Get the number of entries in a hash set

404:   Synopsis:
405: #include <petsc/private/hashsetij.h>
406:   PetscErrorCode PetscHSetIJGetSize(PetscHSetIJ ht,PetscInt *n)

408:   Input Parameter:
409: . ht - The hash set

411:   Output Parameter:
412: . n - The number of entries

414:   Level: developer

416: .seealso: `PetscHSetIJResize()`
417: M*/

419: /*MC
420:   PetscHSetIJGetCapacity - Get the current size of the array in the hash set

422:   Synopsis:
423: #include <petsc/private/hashsetij.h>
424:   PetscErrorCode PetscHSetIJGetCapacity(PetscHSetIJ ht,PetscInt *n)

426:   Input Parameter:
427: . ht - The hash set

429:   Output Parameter:
430: . n - The capacity

432:   Level: developer

434: .seealso: `PetscHSetIJResize()`, `PetscHSetIJGetSize()`
435: M*/

437: /*MC
438:   PetscHSetIJHas - Query for an entry in the hash set

440:   Synopsis:
441: #include <petsc/private/hashsetij.h>
442:   PetscErrorCode PetscHSetIJHas(PetscHSetIJ ht, struct {PetscInt i, j;} key, PetscBool *has)

444:   Input Parameters:
445: + ht  - The hash set
446: - key - The entry

448:   Output Parameter:
449: . has - Boolean indicating whether the entry is in the hash set

451:   Level: developer

453: .seealso: `PetscHSetIJAdd()`, `PetscHSetIJDel()`, `PetscHSetIJQueryAdd()`
454: M*/

456: /*MC
457:   PetscHSetIJAdd - Set an entry in the hash set

459:   Synopsis:
460: #include <petsc/private/hashsetij.h>
461:   PetscErrorCode PetscHSetIJAdd(PetscHSetIJ ht, struct {PetscInt i, j;} key)

463:   Input Parameters:
464: + ht  - The hash set
465: - key - The entry

467:   Level: developer

469: .seealso: `PetscHSetIJDel()`, `PetscHSetIJHas()`, `PetscHSetIJQueryAdd()`
470: M*/

472: /*MC
473:   PetscHSetIJDel - Remove an entry from the hash set

475:   Synopsis:
476: #include <petsc/private/hashsetij.h>
477:   PetscErrorCode PetscHSetIJDel(PetscHSetIJ ht, struct {PetscInt i, j;} key)

479:   Input Parameters:
480: + ht  - The hash set
481: - key - The entry

483:   Level: developer

485: .seealso: `PetscHSetIJAdd()`, `PetscHSetIJHas()`
486: M*/

488: /*MC
489:   PetscHSetIJQueryAdd - Query and add an entry in the hash set

491:   Synopsis:
492: #include <petsc/private/hashsetij.h>
493:   PetscErrorCode PetscHSetIJQueryAdd(PetscHSetIJ ht, struct {PetscInt i, j;} key, PetscBool *missing)

495:   Input Parameters:
496: + ht  - The hash set
497: - key - The entry

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

502:   Level: developer

504: .seealso: `PetscHSetIJQueryDel()`, `PetscHSetIJAdd()`, `PetscHSetIJHas()`
505: M*/

507: /*MC
508:   PetscHSetIJQueryDel - Query and remove an entry from the hash set

510:   Synopsis:
511: #include <petsc/private/hashsetij.h>
512:   PetscErrorCode PetscHSetIJQueryDel(PetscHSetIJ ht, struct {PetscInt i, j;} key, PetscBool *present)

514:   Input Parameters:
515: + ht  - The hash set
516: - key - The entry

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

521:   Level: developer

523: .seealso: `PetscHSetIJQueryAdd()`, `PetscHSetIJDel()`
524: M*/

526: /*MC
527:   PetscHSetIJGetElems - Get all entries from a hash set

529:   Synopsis:
530: #include <petsc/private/hashsetij.h>
531:   PetscErrorCode PetscHSetIJGetElems(PetscHSetIJ ht, PetscInt *off, struct {PetscInt i, j;} array[])

533:   Input Parameters:
534: + ht    - The hash set
535: . off   - Input offset in array (usually zero)
536: - array - Array where to put hash set entries into

538:   Output Parameters:
539: + off   - Output offset in array (output offset = input offset + hash set size)
540: - array - Array filled with the hash set entries

542:   Level: developer

544: .seealso: `PetscHSetIJGetSize()`
545: M*/
546: This file is processed by make allmanpages in $PETSC_DIR/makefile to create manual pages
547: for the types and macros created by PETSC_HASH_MAP(). For example, PetscHMAPIJ.

549: /*S
550:   PetscHMapI - Hash table map

552:   Synopsis:
553:   typedef khash_t(HMapI) *PetscHMapI;

555:   Level: developer

557: .seealso: `PETSC_HASH_MAP()`, `PetscHMapICreate()`
558: S*/
559: typedef struct _PetscHashI PetscHMapI;

561: /*MC
562:   PetscHMapICreate - Create a hash table

564:   Synopsis:
565: #include <petsc/private/hashmapi.h>
566:   PetscErrorCode PetscHMapICreate(PetscHMapI *ht)

568:   Output Parameter:
569: . ht - The hash table

571:   Level: developer

573: .seealso: `PetscHMapIDestroy()`
574: M*/

576: /*MC
577:   PetscHMapIDestroy - Destroy a hash table

579:   Synopsis:
580: #include <petsc/private/hashmapi.h>
581:   PetscErrorCode PetscHMapIDestroy(PetscHMapI *ht)

583:   Input Parameter:
584: . ht - The hash table

586:   Level: developer

588: .seealso: `PetscHMapICreate()`
589: M*/

591: /*MC
592:   PetscHMapIReset - Reset a hash table

594:   Synopsis:
595: #include <petsc/private/hashmapi.h>
596:   PetscErrorCode PetscHMapIReset(PetscHMapI ht)

598:   Input Parameter:
599: . ht - The hash table

601:   Level: developer

603: .seealso: `PetscHMapIClear()`
604: M*/

606: /*MC
607:   PetscHMapIDuplicate - Duplicate a hash table

609:   Synopsis:
610: #include <petsc/private/hashmapi.h>
611:   PetscErrorCode PetscHMapIDuplicate(PetscHMapI ht, PetscHMapI *hd)

613:   Input Parameter:
614: . ht - The source hash table

616:   Output Parameter:
617: . ht - The duplicated hash table

619:   Level: developer

621: .seealso: `PetscHMapICreate()`
622: M*/

624: /*MC
625:   PetscHMapIClear - Clear a hash table

627:   Synopsis:
628: #include <petsc/private/hashmapi.h>
629:   PetscErrorCode PetscHMapIClear(PetscHMapI ht)

631:   Input Parameter:
632: . ht - The hash table

634:   Level: developer

636: .seealso: `PetscHMapIReset()`
637: M*/

639: /*MC
640:   PetscHMapIResize - Set the number of buckets in a hash table

642:   Synopsis:
643: #include <petsc/private/hashmapi.h>
644:   PetscErrorCode PetscHMapIResize(PetscHMapI ht, PetscInt nb)

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

650:   Level: developer

652: .seealso: `PetscHMapICreate()`
653: M*/

655: /*MC
656:   PetscHMapIGetSize - Get the number of entries in a hash table

658:   Synopsis:
659: #include <petsc/private/hashmapi.h>
660:   PetscErrorCode PetscHMapIGetSize(PetscHMapI ht, PetscInt *n)

662:   Input Parameter:
663: . ht - The hash table

665:   Output Parameter:
666: . n - The number of entries

668:   Level: developer

670: .seealso: `PetscHMapIResize()`
671: M*/

673: /*MC
674:   PetscHMapIGetCapacity - Get the current size of the array in the hash table

676:   Synopsis:
677: #include <petsc/private/hashmapi.h>
678:   PetscErrorCode PetscHMapIGetCapacity(PetscHMapI ht, PetscInt *n)

680:   Input Parameter:
681: . ht - The hash table

683:   Output Parameter:
684: . n - The capacity

686:   Level: developer

688: .seealso: `PetscHMapIResize()`, `PetscHMapIGetSize()`
689: M*/

691: /*MC
692:   PetscHMapIHas - Query for a key in the hash table

694:   Synopsis:
695: #include <petsc/private/hashmapi.h>
696:   PetscErrorCode PetscHMapIHas(PetscHMapI ht, PetscInt key, PetscBool *has)

698:   Input Parameters:
699: + ht  - The hash table
700: - key - The key

702:   Output Parameter:
703: . has - Boolean indicating whether key is in the hash table

705:   Level: developer

707: .seealso: `PetscHMapIGet()`, `PetscHMapISet()`, `PetscHMapIFind()`
708: M*/

710: /*MC
711:   PetscHMapIGet - Get the value for a key in the hash table

713:   Synopsis:
714: #include <petsc/private/hashmapi.h>
715:   PetscErrorCode PetscHMapIGet(PetscHMapI ht, PetscInt key, PetscInt *val)

717:   Input Parameters:
718: + ht  - The hash table
719: - key - The key

721:   Output Parameter:
722: . val - The value

724:   Level: developer

726: .seealso: `PetscHMapISet()`, `PetscHMapIIterGet()`
727: M*/

729: /*MC
730:   PetscHMapISet - Set a (key,value) entry in the hash table

732:   Synopsis:
733: #include <petsc/private/hashmapi.h>
734:   PetscErrorCode PetscHMapISet(PetscHMapI ht, PetscInt key, PetscInt val)

736:   Input Parameters:
737: + ht  - The hash table
738: . key - The key
739: - val - The value

741:   Level: developer

743: .seealso: `PetscHMapIGet()`, `PetscHMapIIterSet()`
744: M*/

746: /*MC
747:   PetscHMapIDel - Remove a key and its value from the hash table

749:   Synopsis:
750: #include <petsc/private/hashmapi.h>
751:   PetscErrorCode PetscHMapIDel(PetscHMapI ht,PetscInt key)

753:   Input Parameters:
754: + ht  - The hash table
755: - key - The key

757:   Level: developer

759: .seealso: `PetscHMapIHas()`, `PetscHMapIIterDel()`
760: M*/

762: /*MC
763:   PetscHMapIQuerySet - Query and set a (key,value) entry in the hash table

765:   Synopsis:
766: #include <petsc/private/hashmapi.h>
767:   PetscErrorCode PetscHMapIQuerySet(PetscHMapI ht, PetscInt key, PetscInt val, PetscBool *missing)

769:   Input Parameters:
770: + ht  - The hash table
771: . key - The key
772: - val - The value

774:   Output Parameter:
775: . missing - Boolean indicating whether the key was missing

777:   Level: developer

779: .seealso: `PetscHMapIQueryDel()`, `PetscHMapISet()`
780: M*/

782: /*MC
783:   PetscHMapIQueryDel - Query and remove a (key,value) entry from the hash table

785:   Synopsis:
786: #include <petsc/private/hashmapi.h>
787:   PetscErrorCode PetscHMapIQueryDel(PetscHMapI ht, PetscInt key, PetscBool *present)

789:   Input Parameters:
790: + ht  - The hash table
791: - key - The key

793:   Output Parameter:
794: . present - Boolean indicating whether the key was present

796:   Level: developer

798: .seealso: `PetscHMapIQuerySet()`, `PetscHMapIDel()`
799: M*/

801: /*MC
802:   PetscHMapIFind - Query for key in the hash table

804:   Synopsis:
805: #include <petsc/private/hashmapi.h>
806:   PetscErrorCode PetscHMapIFind(PetscHMapI ht, PetscInt key, PetscHashIter *iter, PetscBool *found)

808:   Input Parameters:
809: + ht  - The hash table
810: - key - The key

812:   Output Parameters:
813: + iter - Iterator referencing the value for key
814: - found - Boolean indicating whether the key was present

816:   Level: developer

818: .seealso: `PetscHMapIIterGet()`, `PetscHMapIIterDel()`
819: M*/

821: /*MC
822:   PetscHMapIPut - Set a key in the hash table

824:   Synopsis:
825: #include <petsc/private/hashmapi.h>
826:   PetscErrorCode PetscHMapIPut(PetscHMapI ht, PetscInt key, PetscHashIter *iter, PetscBool *missing)

828:   Input Parameters:
829: + ht  - The hash table
830: - key - The key

832:   Output Parameters:
833: + iter - Iterator referencing the value for key
834: - missing - Boolean indicating whether the key was missing

836:   Level: developer

838: .seealso: `PetscHMapIIterSet()`, `PetscHMapIQuerySet()`, `PetscHMapISet()`
839: M*/

841: /*MC
842:   PetscHMapIIterGet - Get the value referenced by an iterator in the hash table

844:   Synopsis:
845: #include <petsc/private/hashmapi.h>
846:   PetscErrorCode PetscHMapIIterGet(PetscHMapI ht, PetscHashIter iter, PetscInt *val)

848:   Input Parameters:
849: + ht   - The hash table
850: - iter - The iterator

852:   Output Parameter:
853: . val  - The value

855:   Level: developer

857: .seealso: `PetscHMapIFind()`, `PetscHMapIGet()`
858: M*/

860: /*MC
861:   PetscHMapIIterSet - Set the value referenced by an iterator in the hash

863:   Synopsis:
864: #include <petsc/private/hashmapi.h>
865:   PetscErrorCode PetscHMapIIterSet(PetscHMapI ht, PetscHashIter iter, PetscInt val)

867:   Input Parameters:
868: + ht   - The hash table
869: . iter - The iterator
870: - val  - The value

872:   Level: developer

874: .seealso: `PetscHMapIPut()`, `PetscHMapIQuerySet()`, `PetscHMapISet()`
875: M*/

877: /*MC
878:   PetscHMapIIterDel - Remove the (key,value) referenced by an iterator from the hash table

880:   Synopsis:
881: #include <petsc/private/hashmapi.h>
882:   PetscErrorCode PetscHMapIIterDel(PetscHMapI ht, PetscHashIter iter)

884:   Input Parameters:
885: + ht   - The hash table
886: - iter - The iterator

888:   Level: developer

890: .seealso: `PetscHMapIFind()`, `PetscHMapIQueryDel()`, `PetscHMapIDel()`
891: M*/

893: /*MC
894:   PetscHMapIGetKeys - Get all keys from a hash table

896:   Synopsis:
897: #include <petsc/private/hashmapi.h>
898:   PetscErrorCode PetscHMapIGetKeys(PetscHMapI ht, PetscInt *off, PetscInt array[])

900:   Input Parameters:
901: + ht    - The hash table
902: . off   - Input offset in array (usually zero)
903: - array - Array where to put hash table keys into

905:   Output Parameters:
906: + off   - Output offset in array (output offset = input offset + hash table size)
907: - array - Array filled with the hash table keys

909:   Level: developer

911: .seealso: `PetscHSetIGetSize()`, `PetscHMapIGetVals()`
912: M*/

914: /*MC
915:   PetscHMapIGetVals - Get all values from a hash table

917:   Synopsis:
918: #include <petsc/private/hashmapi.h>
919:   PetscErrorCode PetscHMapIGetVals(PetscHMapI ht, PetscInt *off, PetscInt array[])

921:   Input Parameters:
922: + ht    - The hash table
923: . off   - Input offset in array (usually zero)
924: - array - Array where to put hash table values into

926:   Output Parameters:
927: + off   - Output offset in array (output offset = input offset + hash table size)
928: - array - Array filled with the hash table values

930:   Level: developer

932: .seealso: `PetscHSetIGetSize()`, `PetscHMapIGetKeys()`
933: M*/

935: /*MC
936:   PetscHMapIGetPairs - Get all (key,value) pairs from a hash table

938:   Synopsis:
939: #include <petsc/private/hashmapi.h>
940:   PetscErrorCode PetscHMapIGetPairs(PetscHMapI ht, PetscInt *off, PetscInt karray[], PetscInt varray[])

942:   Input Parameters:
943: + ht    - The hash table
944: . off   - Input offset in array (usually zero)
945: . karray - Array where to put hash table keys into
946: - varray - Array where to put hash table values into

948:   Output Parameters:
949: + off   - Output offset in array (output offset = input offset + hash table size)
950: . karray - Array filled with the hash table keys
951: - varray - Array filled with the hash table values

953:   Level: developer

955: .seealso: `PetscHSetIGetSize()`, `PetscHMapIGetKeys()`, `PetscHMapIGetVals()`
956: M*/
957: This file is processed by make allmanpages in $PETSC_DIR/makefile to create manual pages
958: for the types and macros created by PETSC_HASH_MAP(). For example, PetscHMAPIJ.

960: /*S
961:   PetscHMapIJ - Hash table map

963:   Synopsis:
964:   typedef khash_t(HMapIJ) *PetscHMapIJ;

966:   Level: developer

968: .seealso: `PETSC_HASH_MAP()`, `PetscHMapIJCreate()`
969: S*/
970: typedef struct _PetscHashIJ PetscHMapIJ;

972: /*MC
973:   PetscHMapIJCreate - Create a hash table

975:   Synopsis:
976: #include <petsc/private/hashmapij.h>
977:   PetscErrorCode PetscHMapIJCreate(PetscHMapIJ *ht)

979:   Output Parameter:
980: . ht - The hash table

982:   Level: developer

984: .seealso: `PetscHMapIJDestroy()`
985: M*/

987: /*MC
988:   PetscHMapIJDestroy - Destroy a hash table

990:   Synopsis:
991: #include <petsc/private/hashmapij.h>
992:   PetscErrorCode PetscHMapIJDestroy(PetscHMapIJ *ht)

994:   Input Parameter:
995: . ht - The hash table

997:   Level: developer

999: .seealso: `PetscHMapIJCreate()`
1000: M*/

1002: /*MC
1003:   PetscHMapIJReset - Reset a hash table

1005:   Synopsis:
1006: #include <petsc/private/hashmapij.h>
1007:   PetscErrorCode PetscHMapIJReset(PetscHMapIJ ht)

1009:   Input Parameter:
1010: . ht - The hash table

1012:   Level: developer

1014: .seealso: `PetscHMapIJClear()`
1015: M*/

1017: /*MC
1018:   PetscHMapIJDuplicate - Duplicate a hash table

1020:   Synopsis:
1021: #include <petsc/private/hashmapij.h>
1022:   PetscErrorCode PetscHMapIJDuplicate(PetscHMapIJ ht, PetscHMapIJ *hd)

1024:   Input Parameter:
1025: . ht - The source hash table

1027:   Output Parameter:
1028: . ht - The duplicated hash table

1030:   Level: developer

1032: .seealso: `PetscHMapIJCreate()`
1033: M*/

1035: /*MC
1036:   PetscHMapIJClear - Clear a hash table

1038:   Synopsis:
1039: #include <petsc/private/hashmapij.h>
1040:   PetscErrorCode PetscHMapIJClear(PetscHMapIJ ht)

1042:   Input Parameter:
1043: . ht - The hash table

1045:   Level: developer

1047: .seealso: `PetscHMapIJReset()`
1048: M*/

1050: /*MC
1051:   PetscHMapIJResize - Set the number of buckets in a hash table

1053:   Synopsis:
1054: #include <petsc/private/hashmapij.h>
1055:   PetscErrorCode PetscHMapIJResize(PetscHMapIJ ht, PetscInt nb)

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

1061:   Level: developer

1063: .seealso: `PetscHMapIJCreate()`
1064: M*/

1066: /*MC
1067:   PetscHMapIJGetSize - Get the number of entries in a hash table

1069:   Synopsis:
1070: #include <petsc/private/hashmapij.h>
1071:   PetscErrorCode PetscHMapIJGetSize(PetscHMapIJ ht, PetscInt *n)

1073:   Input Parameter:
1074: . ht - The hash table

1076:   Output Parameter:
1077: . n - The number of entries

1079:   Level: developer

1081: .seealso: `PetscHMapIJResize()`
1082: M*/

1084: /*MC
1085:   PetscHMapIJGetCapacity - Get the current size of the array in the hash table

1087:   Synopsis:
1088: #include <petsc/private/hashmapij.h>
1089:   PetscErrorCode PetscHMapIJGetCapacity(PetscHMapIJ ht, PetscInt *n)

1091:   Input Parameter:
1092: . ht - The hash table

1094:   Output Parameter:
1095: . n - The capacity

1097:   Level: developer

1099: .seealso: `PetscHMapIJResize()`, `PetscHMapIJGetSize()`
1100: M*/

1102: /*MC
1103:   PetscHMapIJHas - Query for a key in the hash table

1105:   Synopsis:
1106: #include <petsc/private/hashmapij.h>
1107:   PetscErrorCode PetscHMapIJHas(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscBool *has)

1109:   Input Parameters:
1110: + ht  - The hash table
1111: - key - The key

1113:   Output Parameter:
1114: . has - Boolean indicating whether key is in the hash table

1116:   Level: developer

1118: .seealso: `PetscHMapIJGet()`, `PetscHMapIJSet()`, `PetscHMapIJFind()`
1119: M*/

1121: /*MC
1122:   PetscHMapIJGet - Get the value for a key in the hash table

1124:   Synopsis:
1125: #include <petsc/private/hashmapij.h>
1126:   PetscErrorCode PetscHMapIJGet(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscInt *val)

1128:   Input Parameters:
1129: + ht  - The hash table
1130: - key - The key

1132:   Output Parameter:
1133: . val - The value

1135:   Level: developer

1137: .seealso: `PetscHMapIJSet()`, `PetscHMapIJIterGet()`
1138: M*/

1140: /*MC
1141:   PetscHMapIJSet - Set a (key,value) entry in the hash table

1143:   Synopsis:
1144: #include <petsc/private/hashmapij.h>
1145:   PetscErrorCode PetscHMapIJSet(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscInt val)

1147:   Input Parameters:
1148: + ht  - The hash table
1149: . key - The key
1150: - val - The value

1152:   Level: developer

1154: .seealso: `PetscHMapIJGet()`, `PetscHMapIJIterSet()`
1155: M*/

1157: /*MC
1158:   PetscHMapIJDel - Remove a key and its value from the hash table

1160:   Synopsis:
1161: #include <petsc/private/hashmapij.h>
1162:   PetscErrorCode PetscHMapIJDel(PetscHMapIJ ht,struct {PetscInt i, j;} key)

1164:   Input Parameters:
1165: + ht  - The hash table
1166: - key - The key

1168:   Level: developer

1170: .seealso: `PetscHMapIJHas()`, `PetscHMapIJIterDel()`
1171: M*/

1173: /*MC
1174:   PetscHMapIJQuerySet - Query and set a (key,value) entry in the hash table

1176:   Synopsis:
1177: #include <petsc/private/hashmapij.h>
1178:   PetscErrorCode PetscHMapIJQuerySet(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscInt val, PetscBool *missing)

1180:   Input Parameters:
1181: + ht  - The hash table
1182: . key - The key
1183: - val - The value

1185:   Output Parameter:
1186: . missing - Boolean indicating whether the key was missing

1188:   Level: developer

1190: .seealso: `PetscHMapIJQueryDel()`, `PetscHMapIJSet()`
1191: M*/

1193: /*MC
1194:   PetscHMapIJQueryDel - Query and remove a (key,value) entry from the hash table

1196:   Synopsis:
1197: #include <petsc/private/hashmapij.h>
1198:   PetscErrorCode PetscHMapIJQueryDel(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscBool *present)

1200:   Input Parameters:
1201: + ht  - The hash table
1202: - key - The key

1204:   Output Parameter:
1205: . present - Boolean indicating whether the key was present

1207:   Level: developer

1209: .seealso: `PetscHMapIJQuerySet()`, `PetscHMapIJDel()`
1210: M*/

1212: /*MC
1213:   PetscHMapIJFind - Query for key in the hash table

1215:   Synopsis:
1216: #include <petsc/private/hashmapij.h>
1217:   PetscErrorCode PetscHMapIJFind(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscHashIter *iter, PetscBool *found)

1219:   Input Parameters:
1220: + ht  - The hash table
1221: - key - The key

1223:   Output Parameters:
1224: + iter - Iterator referencing the value for key
1225: - found - Boolean indicating whether the key was present

1227:   Level: developer

1229: .seealso: `PetscHMapIJIterGet()`, `PetscHMapIJIterDel()`
1230: M*/

1232: /*MC
1233:   PetscHMapIJPut - Set a key in the hash table

1235:   Synopsis:
1236: #include <petsc/private/hashmapij.h>
1237:   PetscErrorCode PetscHMapIJPut(PetscHMapIJ ht, struct {PetscInt i, j;} key, PetscHashIter *iter, PetscBool *missing)

1239:   Input Parameters:
1240: + ht  - The hash table
1241: - key - The key

1243:   Output Parameters:
1244: + iter - Iterator referencing the value for key
1245: - missing - Boolean indicating whether the key was missing

1247:   Level: developer

1249: .seealso: `PetscHMapIJIterSet()`, `PetscHMapIJQuerySet()`, `PetscHMapIJSet()`
1250: M*/

1252: /*MC
1253:   PetscHMapIJIterGet - Get the value referenced by an iterator in the hash table

1255:   Synopsis:
1256: #include <petsc/private/hashmapij.h>
1257:   PetscErrorCode PetscHMapIJIterGet(PetscHMapIJ ht, PetscHashIter iter, PetscInt *val)

1259:   Input Parameters:
1260: + ht   - The hash table
1261: - iter - The iterator

1263:   Output Parameter:
1264: . val  - The value

1266:   Level: developer

1268: .seealso: `PetscHMapIJFind()`, `PetscHMapIJGet()`
1269: M*/

1271: /*MC
1272:   PetscHMapIJIterSet - Set the value referenced by an iterator in the hash

1274:   Synopsis:
1275: #include <petsc/private/hashmapij.h>
1276:   PetscErrorCode PetscHMapIJIterSet(PetscHMapIJ ht, PetscHashIter iter, PetscInt val)

1278:   Input Parameters:
1279: + ht   - The hash table
1280: . iter - The iterator
1281: - val  - The value

1283:   Level: developer

1285: .seealso: `PetscHMapIJPut()`, `PetscHMapIJQuerySet()`, `PetscHMapIJSet()`
1286: M*/

1288: /*MC
1289:   PetscHMapIJIterDel - Remove the (key,value) referenced by an iterator from the hash table

1291:   Synopsis:
1292: #include <petsc/private/hashmapij.h>
1293:   PetscErrorCode PetscHMapIJIterDel(PetscHMapIJ ht, PetscHashIter iter)

1295:   Input Parameters:
1296: + ht   - The hash table
1297: - iter - The iterator

1299:   Level: developer

1301: .seealso: `PetscHMapIJFind()`, `PetscHMapIJQueryDel()`, `PetscHMapIJDel()`
1302: M*/

1304: /*MC
1305:   PetscHMapIJGetKeys - Get all keys from a hash table

1307:   Synopsis:
1308: #include <petsc/private/hashmapij.h>
1309:   PetscErrorCode PetscHMapIJGetKeys(PetscHMapIJ ht, PetscInt *off, struct {PetscInt i, j;} array[])

1311:   Input Parameters:
1312: + ht    - The hash table
1313: . off   - Input offset in array (usually zero)
1314: - array - Array where to put hash table keys into

1316:   Output Parameters:
1317: + off   - Output offset in array (output offset = input offset + hash table size)
1318: - array - Array filled with the hash table keys

1320:   Level: developer

1322: .seealso: `PetscHSetIJGetSize()`, `PetscHMapIJGetVals()`
1323: M*/

1325: /*MC
1326:   PetscHMapIJGetVals - Get all values from a hash table

1328:   Synopsis:
1329: #include <petsc/private/hashmapij.h>
1330:   PetscErrorCode PetscHMapIJGetVals(PetscHMapIJ ht, PetscInt *off, PetscInt array[])

1332:   Input Parameters:
1333: + ht    - The hash table
1334: . off   - Input offset in array (usually zero)
1335: - array - Array where to put hash table values into

1337:   Output Parameters:
1338: + off   - Output offset in array (output offset = input offset + hash table size)
1339: - array - Array filled with the hash table values

1341:   Level: developer

1343: .seealso: `PetscHSetIJGetSize()`, `PetscHMapIJGetKeys()`
1344: M*/

1346: /*MC
1347:   PetscHMapIJGetPairs - Get all (key,value) pairs from a hash table

1349:   Synopsis:
1350: #include <petsc/private/hashmapij.h>
1351:   PetscErrorCode PetscHMapIJGetPairs(PetscHMapIJ ht, PetscInt *off, struct {PetscInt i, j;} karray[], PetscInt varray[])

1353:   Input Parameters:
1354: + ht    - The hash table
1355: . off   - Input offset in array (usually zero)
1356: . karray - Array where to put hash table keys into
1357: - varray - Array where to put hash table values into

1359:   Output Parameters:
1360: + off   - Output offset in array (output offset = input offset + hash table size)
1361: . karray - Array filled with the hash table keys
1362: - varray - Array filled with the hash table values

1364:   Level: developer

1366: .seealso: `PetscHSetIJGetSize()`, `PetscHMapIJGetKeys()`, `PetscHMapIJGetVals()`
1367: M*/
1368: This file is processed by make allmanpages in $PETSC_DIR/makefile to create manual pages
1369: for the types and macros created by PETSC_HASH_MAP(). For example, PetscHMAPIJ.

1371: /*S
1372:   PetscHMapIV - Hash table map

1374:   Synopsis:
1375:   typedef khash_t(HMapIV) *PetscHMapIV;

1377:   Level: developer

1379: .seealso: `PETSC_HASH_MAP()`, `PetscHMapIVCreate()`
1380: S*/
1381: typedef struct _PetscHashIV PetscHMapIV;

1383: /*MC
1384:   PetscHMapIVCreate - Create a hash table

1386:   Synopsis:
1387: #include <petsc/private/hashmapiv.h>
1388:   PetscErrorCode PetscHMapIVCreate(PetscHMapIV *ht)

1390:   Output Parameter:
1391: . ht - The hash table

1393:   Level: developer

1395: .seealso: `PetscHMapIVDestroy()`
1396: M*/

1398: /*MC
1399:   PetscHMapIVDestroy - Destroy a hash table

1401:   Synopsis:
1402: #include <petsc/private/hashmapiv.h>
1403:   PetscErrorCode PetscHMapIVDestroy(PetscHMapIV *ht)

1405:   Input Parameter:
1406: . ht - The hash table

1408:   Level: developer

1410: .seealso: `PetscHMapIVCreate()`
1411: M*/

1413: /*MC
1414:   PetscHMapIVReset - Reset a hash table

1416:   Synopsis:
1417: #include <petsc/private/hashmapiv.h>
1418:   PetscErrorCode PetscHMapIVReset(PetscHMapIV ht)

1420:   Input Parameter:
1421: . ht - The hash table

1423:   Level: developer

1425: .seealso: `PetscHMapIVClear()`
1426: M*/

1428: /*MC
1429:   PetscHMapIVDuplicate - Duplicate a hash table

1431:   Synopsis:
1432: #include <petsc/private/hashmapiv.h>
1433:   PetscErrorCode PetscHMapIVDuplicate(PetscHMapIV ht, PetscHMapIV *hd)

1435:   Input Parameter:
1436: . ht - The source hash table

1438:   Output Parameter:
1439: . ht - The duplicated hash table

1441:   Level: developer

1443: .seealso: `PetscHMapIVCreate()`
1444: M*/

1446: /*MC
1447:   PetscHMapIVClear - Clear a hash table

1449:   Synopsis:
1450: #include <petsc/private/hashmapiv.h>
1451:   PetscErrorCode PetscHMapIVClear(PetscHMapIV ht)

1453:   Input Parameter:
1454: . ht - The hash table

1456:   Level: developer

1458: .seealso: `PetscHMapIVReset()`
1459: M*/

1461: /*MC
1462:   PetscHMapIVResize - Set the number of buckets in a hash table

1464:   Synopsis:
1465: #include <petsc/private/hashmapiv.h>
1466:   PetscErrorCode PetscHMapIVResize(PetscHMapIV ht, PetscInt nb)

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

1472:   Level: developer

1474: .seealso: `PetscHMapIVCreate()`
1475: M*/

1477: /*MC
1478:   PetscHMapIVGetSize - Get the number of entries in a hash table

1480:   Synopsis:
1481: #include <petsc/private/hashmapiv.h>
1482:   PetscErrorCode PetscHMapIVGetSize(PetscHMapIV ht, PetscInt *n)

1484:   Input Parameter:
1485: . ht - The hash table

1487:   Output Parameter:
1488: . n - The number of entries

1490:   Level: developer

1492: .seealso: `PetscHMapIVResize()`
1493: M*/

1495: /*MC
1496:   PetscHMapIVGetCapacity - Get the current size of the array in the hash table

1498:   Synopsis:
1499: #include <petsc/private/hashmapiv.h>
1500:   PetscErrorCode PetscHMapIVGetCapacity(PetscHMapIV ht, PetscInt *n)

1502:   Input Parameter:
1503: . ht - The hash table

1505:   Output Parameter:
1506: . n - The capacity

1508:   Level: developer

1510: .seealso: `PetscHMapIVResize()`, `PetscHMapIVGetSize()`
1511: M*/

1513: /*MC
1514:   PetscHMapIVHas - Query for a key in the hash table

1516:   Synopsis:
1517: #include <petsc/private/hashmapiv.h>
1518:   PetscErrorCode PetscHMapIVHas(PetscHMapIV ht, PetscInt key, PetscBool *has)

1520:   Input Parameters:
1521: + ht  - The hash table
1522: - key - The key

1524:   Output Parameter:
1525: . has - Boolean indicating whether key is in the hash table

1527:   Level: developer

1529: .seealso: `PetscHMapIVGet()`, `PetscHMapIVSet()`, `PetscHMapIVFind()`
1530: M*/

1532: /*MC
1533:   PetscHMapIVGet - Get the value for a key in the hash table

1535:   Synopsis:
1536: #include <petsc/private/hashmapiv.h>
1537:   PetscErrorCode PetscHMapIVGet(PetscHMapIV ht, PetscInt key, PetscScalar *val)

1539:   Input Parameters:
1540: + ht  - The hash table
1541: - key - The key

1543:   Output Parameter:
1544: . val - The value

1546:   Level: developer

1548: .seealso: `PetscHMapIVSet()`, `PetscHMapIVIterGet()`
1549: M*/

1551: /*MC
1552:   PetscHMapIVSet - Set a (key,value) entry in the hash table

1554:   Synopsis:
1555: #include <petsc/private/hashmapiv.h>
1556:   PetscErrorCode PetscHMapIVSet(PetscHMapIV ht, PetscInt key, PetscScalar val)

1558:   Input Parameters:
1559: + ht  - The hash table
1560: . key - The key
1561: - val - The value

1563:   Level: developer

1565: .seealso: `PetscHMapIVGet()`, `PetscHMapIVIterSet()`
1566: M*/

1568: /*MC
1569:   PetscHMapIVDel - Remove a key and its value from the hash table

1571:   Synopsis:
1572: #include <petsc/private/hashmapiv.h>
1573:   PetscErrorCode PetscHMapIVDel(PetscHMapIV ht,PetscInt key)

1575:   Input Parameters:
1576: + ht  - The hash table
1577: - key - The key

1579:   Level: developer

1581: .seealso: `PetscHMapIVHas()`, `PetscHMapIVIterDel()`
1582: M*/

1584: /*MC
1585:   PetscHMapIVQuerySet - Query and set a (key,value) entry in the hash table

1587:   Synopsis:
1588: #include <petsc/private/hashmapiv.h>
1589:   PetscErrorCode PetscHMapIVQuerySet(PetscHMapIV ht, PetscInt key, PetscScalar val, PetscBool *missing)

1591:   Input Parameters:
1592: + ht  - The hash table
1593: . key - The key
1594: - val - The value

1596:   Output Parameter:
1597: . missing - Boolean indicating whether the key was missing

1599:   Level: developer

1601: .seealso: `PetscHMapIVQueryDel()`, `PetscHMapIVSet()`
1602: M*/

1604: /*MC
1605:   PetscHMapIVQueryDel - Query and remove a (key,value) entry from the hash table

1607:   Synopsis:
1608: #include <petsc/private/hashmapiv.h>
1609:   PetscErrorCode PetscHMapIVQueryDel(PetscHMapIV ht, PetscInt key, PetscBool *present)

1611:   Input Parameters:
1612: + ht  - The hash table
1613: - key - The key

1615:   Output Parameter:
1616: . present - Boolean indicating whether the key was present

1618:   Level: developer

1620: .seealso: `PetscHMapIVQuerySet()`, `PetscHMapIVDel()`
1621: M*/

1623: /*MC
1624:   PetscHMapIVFind - Query for key in the hash table

1626:   Synopsis:
1627: #include <petsc/private/hashmapiv.h>
1628:   PetscErrorCode PetscHMapIVFind(PetscHMapIV ht, PetscInt key, PetscHashIter *iter, PetscBool *found)

1630:   Input Parameters:
1631: + ht  - The hash table
1632: - key - The key

1634:   Output Parameters:
1635: + iter - Iterator referencing the value for key
1636: - found - Boolean indicating whether the key was present

1638:   Level: developer

1640: .seealso: `PetscHMapIVIterGet()`, `PetscHMapIVIterDel()`
1641: M*/

1643: /*MC
1644:   PetscHMapIVPut - Set a key in the hash table

1646:   Synopsis:
1647: #include <petsc/private/hashmapiv.h>
1648:   PetscErrorCode PetscHMapIVPut(PetscHMapIV ht, PetscInt key, PetscHashIter *iter, PetscBool *missing)

1650:   Input Parameters:
1651: + ht  - The hash table
1652: - key - The key

1654:   Output Parameters:
1655: + iter - Iterator referencing the value for key
1656: - missing - Boolean indicating whether the key was missing

1658:   Level: developer

1660: .seealso: `PetscHMapIVIterSet()`, `PetscHMapIVQuerySet()`, `PetscHMapIVSet()`
1661: M*/

1663: /*MC
1664:   PetscHMapIVIterGet - Get the value referenced by an iterator in the hash table

1666:   Synopsis:
1667: #include <petsc/private/hashmapiv.h>
1668:   PetscErrorCode PetscHMapIVIterGet(PetscHMapIV ht, PetscHashIter iter, PetscScalar *val)

1670:   Input Parameters:
1671: + ht   - The hash table
1672: - iter - The iterator

1674:   Output Parameter:
1675: . val  - The value

1677:   Level: developer

1679: .seealso: `PetscHMapIVFind()`, `PetscHMapIVGet()`
1680: M*/

1682: /*MC
1683:   PetscHMapIVIterSet - Set the value referenced by an iterator in the hash

1685:   Synopsis:
1686: #include <petsc/private/hashmapiv.h>
1687:   PetscErrorCode PetscHMapIVIterSet(PetscHMapIV ht, PetscHashIter iter, PetscScalar val)

1689:   Input Parameters:
1690: + ht   - The hash table
1691: . iter - The iterator
1692: - val  - The value

1694:   Level: developer

1696: .seealso: `PetscHMapIVPut()`, `PetscHMapIVQuerySet()`, `PetscHMapIVSet()`
1697: M*/

1699: /*MC
1700:   PetscHMapIVIterDel - Remove the (key,value) referenced by an iterator from the hash table

1702:   Synopsis:
1703: #include <petsc/private/hashmapiv.h>
1704:   PetscErrorCode PetscHMapIVIterDel(PetscHMapIV ht, PetscHashIter iter)

1706:   Input Parameters:
1707: + ht   - The hash table
1708: - iter - The iterator

1710:   Level: developer

1712: .seealso: `PetscHMapIVFind()`, `PetscHMapIVQueryDel()`, `PetscHMapIVDel()`
1713: M*/

1715: /*MC
1716:   PetscHMapIVGetKeys - Get all keys from a hash table

1718:   Synopsis:
1719: #include <petsc/private/hashmapiv.h>
1720:   PetscErrorCode PetscHMapIVGetKeys(PetscHMapIV ht, PetscInt *off, PetscInt array[])

1722:   Input Parameters:
1723: + ht    - The hash table
1724: . off   - Input offset in array (usually zero)
1725: - array - Array where to put hash table keys into

1727:   Output Parameters:
1728: + off   - Output offset in array (output offset = input offset + hash table size)
1729: - array - Array filled with the hash table keys

1731:   Level: developer

1733: .seealso: `PetscHSetIVGetSize()`, `PetscHMapIVGetVals()`
1734: M*/

1736: /*MC
1737:   PetscHMapIVGetVals - Get all values from a hash table

1739:   Synopsis:
1740: #include <petsc/private/hashmapiv.h>
1741:   PetscErrorCode PetscHMapIVGetVals(PetscHMapIV ht, PetscInt *off, PetscScalar array[])

1743:   Input Parameters:
1744: + ht    - The hash table
1745: . off   - Input offset in array (usually zero)
1746: - array - Array where to put hash table values into

1748:   Output Parameters:
1749: + off   - Output offset in array (output offset = input offset + hash table size)
1750: - array - Array filled with the hash table values

1752:   Level: developer

1754: .seealso: `PetscHSetIVGetSize()`, `PetscHMapIVGetKeys()`
1755: M*/

1757: /*MC
1758:   PetscHMapIVGetPairs - Get all (key,value) pairs from a hash table

1760:   Synopsis:
1761: #include <petsc/private/hashmapiv.h>
1762:   PetscErrorCode PetscHMapIVGetPairs(PetscHMapIV ht, PetscInt *off, PetscInt karray[], PetscScalar varray[])

1764:   Input Parameters:
1765: + ht    - The hash table
1766: . off   - Input offset in array (usually zero)
1767: . karray - Array where to put hash table keys into
1768: - varray - Array where to put hash table values into

1770:   Output Parameters:
1771: + off   - Output offset in array (output offset = input offset + hash table size)
1772: . karray - Array filled with the hash table keys
1773: - varray - Array filled with the hash table values

1775:   Level: developer

1777: .seealso: `PetscHSetIVGetSize()`, `PetscHMapIVGetKeys()`, `PetscHMapIVGetVals()`
1778: M*/
1779: This file is processed by make allmanpages in $PETSC_DIR/makefile to create manual pages
1780: for the types and macros created by PETSC_HASH_MAP(). For example, PetscHMAPIJ.

1782: /*S
1783:   PetscHMapObj - Hash table map

1785:   Synopsis:
1786:   typedef khash_t(HMapObj) *PetscHMapObj;

1788:   Level: developer

1790: .seealso: `PETSC_HASH_MAP()`, `PetscHMapObjCreate()`
1791: S*/
1792: typedef struct _PetscHashObj PetscHMapObj;

1794: /*MC
1795:   PetscHMapObjCreate - Create a hash table

1797:   Synopsis:
1798: #include <petsc/private/hashmapobj.h>
1799:   PetscErrorCode PetscHMapObjCreate(PetscHMapObj *ht)

1801:   Output Parameter:
1802: . ht - The hash table

1804:   Level: developer

1806: .seealso: `PetscHMapObjDestroy()`
1807: M*/

1809: /*MC
1810:   PetscHMapObjDestroy - Destroy a hash table

1812:   Synopsis:
1813: #include <petsc/private/hashmapobj.h>
1814:   PetscErrorCode PetscHMapObjDestroy(PetscHMapObj *ht)

1816:   Input Parameter:
1817: . ht - The hash table

1819:   Level: developer

1821: .seealso: `PetscHMapObjCreate()`
1822: M*/

1824: /*MC
1825:   PetscHMapObjReset - Reset a hash table

1827:   Synopsis:
1828: #include <petsc/private/hashmapobj.h>
1829:   PetscErrorCode PetscHMapObjReset(PetscHMapObj ht)

1831:   Input Parameter:
1832: . ht - The hash table

1834:   Level: developer

1836: .seealso: `PetscHMapObjClear()`
1837: M*/

1839: /*MC
1840:   PetscHMapObjDuplicate - Duplicate a hash table

1842:   Synopsis:
1843: #include <petsc/private/hashmapobj.h>
1844:   PetscErrorCode PetscHMapObjDuplicate(PetscHMapObj ht, PetscHMapObj *hd)

1846:   Input Parameter:
1847: . ht - The source hash table

1849:   Output Parameter:
1850: . ht - The duplicated hash table

1852:   Level: developer

1854: .seealso: `PetscHMapObjCreate()`
1855: M*/

1857: /*MC
1858:   PetscHMapObjClear - Clear a hash table

1860:   Synopsis:
1861: #include <petsc/private/hashmapobj.h>
1862:   PetscErrorCode PetscHMapObjClear(PetscHMapObj ht)

1864:   Input Parameter:
1865: . ht - The hash table

1867:   Level: developer

1869: .seealso: `PetscHMapObjReset()`
1870: M*/

1872: /*MC
1873:   PetscHMapObjResize - Set the number of buckets in a hash table

1875:   Synopsis:
1876: #include <petsc/private/hashmapobj.h>
1877:   PetscErrorCode PetscHMapObjResize(PetscHMapObj ht, PetscInt nb)

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

1883:   Level: developer

1885: .seealso: `PetscHMapObjCreate()`
1886: M*/

1888: /*MC
1889:   PetscHMapObjGetSize - Get the number of entries in a hash table

1891:   Synopsis:
1892: #include <petsc/private/hashmapobj.h>
1893:   PetscErrorCode PetscHMapObjGetSize(PetscHMapObj ht, PetscInt *n)

1895:   Input Parameter:
1896: . ht - The hash table

1898:   Output Parameter:
1899: . n - The number of entries

1901:   Level: developer

1903: .seealso: `PetscHMapObjResize()`
1904: M*/

1906: /*MC
1907:   PetscHMapObjGetCapacity - Get the current size of the array in the hash table

1909:   Synopsis:
1910: #include <petsc/private/hashmapobj.h>
1911:   PetscErrorCode PetscHMapObjGetCapacity(PetscHMapObj ht, PetscInt *n)

1913:   Input Parameter:
1914: . ht - The hash table

1916:   Output Parameter:
1917: . n - The capacity

1919:   Level: developer

1921: .seealso: `PetscHMapObjResize()`, `PetscHMapObjGetSize()`
1922: M*/

1924: /*MC
1925:   PetscHMapObjHas - Query for a key in the hash table

1927:   Synopsis:
1928: #include <petsc/private/hashmapobj.h>
1929:   PetscErrorCode PetscHMapObjHas(PetscHMapObj ht, PetscInt64 key, PetscBool *has)

1931:   Input Parameters:
1932: + ht  - The hash table
1933: - key - The key

1935:   Output Parameter:
1936: . has - Boolean indicating whether key is in the hash table

1938:   Level: developer

1940: .seealso: `PetscHMapObjGet()`, `PetscHMapObjSet()`, `PetscHMapObjFind()`
1941: M*/

1943: /*MC
1944:   PetscHMapObjGet - Get the value for a key in the hash table

1946:   Synopsis:
1947: #include <petsc/private/hashmapobj.h>
1948:   PetscErrorCode PetscHMapObjGet(PetscHMapObj ht, PetscInt64 key, PetscObject *val)

1950:   Input Parameters:
1951: + ht  - The hash table
1952: - key - The key

1954:   Output Parameter:
1955: . val - The value

1957:   Level: developer

1959: .seealso: `PetscHMapObjSet()`, `PetscHMapObjIterGet()`
1960: M*/

1962: /*MC
1963:   PetscHMapObjSet - Set a (key,value) entry in the hash table

1965:   Synopsis:
1966: #include <petsc/private/hashmapobj.h>
1967:   PetscErrorCode PetscHMapObjSet(PetscHMapObj ht, PetscInt64 key, PetscObject val)

1969:   Input Parameters:
1970: + ht  - The hash table
1971: . key - The key
1972: - val - The value

1974:   Level: developer

1976: .seealso: `PetscHMapObjGet()`, `PetscHMapObjIterSet()`
1977: M*/

1979: /*MC
1980:   PetscHMapObjDel - Remove a key and its value from the hash table

1982:   Synopsis:
1983: #include <petsc/private/hashmapobj.h>
1984:   PetscErrorCode PetscHMapObjDel(PetscHMapObj ht,PetscInt64 key)

1986:   Input Parameters:
1987: + ht  - The hash table
1988: - key - The key

1990:   Level: developer

1992: .seealso: `PetscHMapObjHas()`, `PetscHMapObjIterDel()`
1993: M*/

1995: /*MC
1996:   PetscHMapObjQuerySet - Query and set a (key,value) entry in the hash table

1998:   Synopsis:
1999: #include <petsc/private/hashmapobj.h>
2000:   PetscErrorCode PetscHMapObjQuerySet(PetscHMapObj ht, PetscInt64 key, PetscObject val, PetscBool *missing)

2002:   Input Parameters:
2003: + ht  - The hash table
2004: . key - The key
2005: - val - The value

2007:   Output Parameter:
2008: . missing - Boolean indicating whether the key was missing

2010:   Level: developer

2012: .seealso: `PetscHMapObjQueryDel()`, `PetscHMapObjSet()`
2013: M*/

2015: /*MC
2016:   PetscHMapObjQueryDel - Query and remove a (key,value) entry from the hash table

2018:   Synopsis:
2019: #include <petsc/private/hashmapobj.h>
2020:   PetscErrorCode PetscHMapObjQueryDel(PetscHMapObj ht, PetscInt64 key, PetscBool *present)

2022:   Input Parameters:
2023: + ht  - The hash table
2024: - key - The key

2026:   Output Parameter:
2027: . present - Boolean indicating whether the key was present

2029:   Level: developer

2031: .seealso: `PetscHMapObjQuerySet()`, `PetscHMapObjDel()`
2032: M*/

2034: /*MC
2035:   PetscHMapObjFind - Query for key in the hash table

2037:   Synopsis:
2038: #include <petsc/private/hashmapobj.h>
2039:   PetscErrorCode PetscHMapObjFind(PetscHMapObj ht, PetscInt64 key, PetscHashIter *iter, PetscBool *found)

2041:   Input Parameters:
2042: + ht  - The hash table
2043: - key - The key

2045:   Output Parameters:
2046: + iter - Iterator referencing the value for key
2047: - found - Boolean indicating whether the key was present

2049:   Level: developer

2051: .seealso: `PetscHMapObjIterGet()`, `PetscHMapObjIterDel()`
2052: M*/

2054: /*MC
2055:   PetscHMapObjPut - Set a key in the hash table

2057:   Synopsis:
2058: #include <petsc/private/hashmapobj.h>
2059:   PetscErrorCode PetscHMapObjPut(PetscHMapObj ht, PetscInt64 key, PetscHashIter *iter, PetscBool *missing)

2061:   Input Parameters:
2062: + ht  - The hash table
2063: - key - The key

2065:   Output Parameters:
2066: + iter - Iterator referencing the value for key
2067: - missing - Boolean indicating whether the key was missing

2069:   Level: developer

2071: .seealso: `PetscHMapObjIterSet()`, `PetscHMapObjQuerySet()`, `PetscHMapObjSet()`
2072: M*/

2074: /*MC
2075:   PetscHMapObjIterGet - Get the value referenced by an iterator in the hash table

2077:   Synopsis:
2078: #include <petsc/private/hashmapobj.h>
2079:   PetscErrorCode PetscHMapObjIterGet(PetscHMapObj ht, PetscHashIter iter, PetscObject *val)

2081:   Input Parameters:
2082: + ht   - The hash table
2083: - iter - The iterator

2085:   Output Parameter:
2086: . val  - The value

2088:   Level: developer

2090: .seealso: `PetscHMapObjFind()`, `PetscHMapObjGet()`
2091: M*/

2093: /*MC
2094:   PetscHMapObjIterSet - Set the value referenced by an iterator in the hash

2096:   Synopsis:
2097: #include <petsc/private/hashmapobj.h>
2098:   PetscErrorCode PetscHMapObjIterSet(PetscHMapObj ht, PetscHashIter iter, PetscObject val)

2100:   Input Parameters:
2101: + ht   - The hash table
2102: . iter - The iterator
2103: - val  - The value

2105:   Level: developer

2107: .seealso: `PetscHMapObjPut()`, `PetscHMapObjQuerySet()`, `PetscHMapObjSet()`
2108: M*/

2110: /*MC
2111:   PetscHMapObjIterDel - Remove the (key,value) referenced by an iterator from the hash table

2113:   Synopsis:
2114: #include <petsc/private/hashmapobj.h>
2115:   PetscErrorCode PetscHMapObjIterDel(PetscHMapObj ht, PetscHashIter iter)

2117:   Input Parameters:
2118: + ht   - The hash table
2119: - iter - The iterator

2121:   Level: developer

2123: .seealso: `PetscHMapObjFind()`, `PetscHMapObjQueryDel()`, `PetscHMapObjDel()`
2124: M*/

2126: /*MC
2127:   PetscHMapObjGetKeys - Get all keys from a hash table

2129:   Synopsis:
2130: #include <petsc/private/hashmapobj.h>
2131:   PetscErrorCode PetscHMapObjGetKeys(PetscHMapObj ht, PetscInt *off, PetscInt64 array[])

2133:   Input Parameters:
2134: + ht    - The hash table
2135: . off   - Input offset in array (usually zero)
2136: - array - Array where to put hash table keys into

2138:   Output Parameters:
2139: + off   - Output offset in array (output offset = input offset + hash table size)
2140: - array - Array filled with the hash table keys

2142:   Level: developer

2144: .seealso: `PetscHSetObjGetSize()`, `PetscHMapObjGetVals()`
2145: M*/

2147: /*MC
2148:   PetscHMapObjGetVals - Get all values from a hash table

2150:   Synopsis:
2151: #include <petsc/private/hashmapobj.h>
2152:   PetscErrorCode PetscHMapObjGetVals(PetscHMapObj ht, PetscInt *off, PetscObject array[])

2154:   Input Parameters:
2155: + ht    - The hash table
2156: . off   - Input offset in array (usually zero)
2157: - array - Array where to put hash table values into

2159:   Output Parameters:
2160: + off   - Output offset in array (output offset = input offset + hash table size)
2161: - array - Array filled with the hash table values

2163:   Level: developer

2165: .seealso: `PetscHSetObjGetSize()`, `PetscHMapObjGetKeys()`
2166: M*/

2168: /*MC
2169:   PetscHMapObjGetPairs - Get all (key,value) pairs from a hash table

2171:   Synopsis:
2172: #include <petsc/private/hashmapobj.h>
2173:   PetscErrorCode PetscHMapObjGetPairs(PetscHMapObj ht, PetscInt *off, PetscInt64 karray[], PetscObject varray[])

2175:   Input Parameters:
2176: + ht    - The hash table
2177: . off   - Input offset in array (usually zero)
2178: . karray - Array where to put hash table keys into
2179: - varray - Array where to put hash table values into

2181:   Output Parameters:
2182: + off   - Output offset in array (output offset = input offset + hash table size)
2183: . karray - Array filled with the hash table keys
2184: - varray - Array filled with the hash table values

2186:   Level: developer

2188: .seealso: `PetscHSetObjGetSize()`, `PetscHMapObjGetKeys()`, `PetscHMapObjGetVals()`
2189: M*/