petsc-3.11.4 2019-09-28
Report Typos and Errors

PetscHSetT

Hash table set

Synopsis

/*MC
  PetscHSetTCreate - Create a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTCreate(PetscHSetT *ht)

  Output Parameter:
. ht - The hash table

  


.keywords: hash table, set, create
.seealso: PetscHSetTDestroy()
M*/

/*MC
  PetscHSetTDestroy - Destroy a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTDestroy(PetscHSetT *ht)

  Input Parameter:
. ht - The hash table

  


.keywords: hash table, set, destroy
.seealso: PetscHSetTCreate()
M*/

/*MC
  PetscHSetTReset - Reset a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTReset(PetscHSetT ht)

  Input Parameter:
. ht - The hash table

  


.keywords: hash table, set, reset
.seealso: PetscHSetTClear()
M*/

/*MC
  PetscHSetTDuplicate - Duplicate a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTDuplicate(PetscHSetT ht,PetscHSetT *hd)

  Input Parameter:
. ht - The source hash table

  Output Parameter:
. ht - The duplicated hash table

  


.keywords: hash table, set, duplicate
.seealso: PetscHSetTCreate()
M*/

/*MC
  PetscHSetTClear - Clear a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTClear(PetscHSetT ht)

  Input Parameter:
. ht - The hash table

  


.keywords: hash table, set, reset
.seealso: PetscHSetTReset()
M*/

/*MC
  PetscHSetTResize - Set the number of buckets in a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTResize(PetscHSetT ht,PetscInt nb)

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

  


.seealso: PetscHSetTCreate()
M*/

/*MC
  PetscHSetTGetSize - Get the number of entries in a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTGetSize(PetscHSetT ht,PetscInt *n)

  Input Parameter:
. ht - The hash table

  Output Parameter:
. n - The number of entries

  


.keywords: hash table, set, resize
.seealso: PetscHSetTResize()
M*/

/*MC
  PetscHSetTHas - Query for an entry in the hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTHas(PetscHSetT ht,KeyType key,PetscBool *has)

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

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

  


.keywords: hash table, set, query
.seealso:  PetscHSetTAdd(), PetscHSetTDel()
M*/

/*MC
  PetscHSetTAdd - Set an entry in the hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTAdd(PetscHSetT ht,KeyType key)

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

  


.keywords: hash table, set, add
.seealso: PetscHSetTDel(), PetscHSetTHas()
M*/

/*MC
  PetscHSetTDel - Remove an entry from the hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTDel(PetscHSetT ht,KeyType key)

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

  


.keywords: hash table, set, del
.seealso: PetscHSetTAdd(), PetscHSetTHas()
M*/

/*MC
  PetscHSetTQueryAdd - Query and add an entry in the hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTQueryAdd(PetscHSetT ht,KeyType key,PetscBool *missing)

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

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

  


.keywords: hash table, set, query, set
.seealso: PetscHSetTQueryDel(), PetscHSetTAdd()
M*/

/*MC
  PetscHSetTQueryDel - Query and remove an entry from the hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTQueryDel(PetscHSetT ht,KeyType key,PetscBool *present)

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

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

  


.keywords: hash table, set, query, del
.seealso: PetscHSetTQueryAdd(), PetscHSetTDel()
M*/

/*MC
  PetscHSetTGetElems - Get all entries from a hash table

  Synopsis:
  #include <petsc/private/hashset.h>
  PetscErrorCode PetscHSetTGetElems(PetscHSetT ht,PetscInt *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

  


.keywords: hash table, set, array
.seealso: PetscHSetTGetSize()
M*/

#define PETSC_HASH_SET(HashT, KeyType, HashFunc, EqualFunc)                                          \
                                                                                                     \
KHASH_INIT(HashT, KeyType, char, 0, HashFunc, EqualFunc)                                             \
                                                                                                     \
typedef khash_t(HashT) *Pet.c.html##HashT;

Synopsis

typedef khash_t(HSetT) *PetscHSetT;

Keywords

hash table, set

See Also

PETSC_HASH_SET(), PetscHSetTCreate()

Level

developer

Location

include/petsc/private/hashset.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages