NGSolve
4.9
|
A hash-table. More...
#include <hashtable.hpp>
Public Member Functions | |
HashTable (int size) | |
Constructs a hashtable of size bags. | |
void | Set (const T_HASH &ahash, const T &acont) |
Sets identifier ahash to value acont. | |
const T & | Get (const T_HASH &ahash) const |
get value of identifier ahash, exception if unused | |
const T & | Get (int bnr, int pos) const |
get value of identifier ahash, exception if unused | |
bool | Used (const T_HASH &ahash) const |
is identifier used ? | |
bool | Used (const T_HASH &ahash, int &bnr, int &pos) const |
is identifier used ? | |
int | Size () const |
number of hash entries | |
int | EntrySize (int bnr) const |
size of hash entry | |
void | GetData (int bnr, int colnr, T_HASH &ahash, T &acont) |
get identifier and value of entry bnr, position colnr | |
void | SetData (int bnr, int colnr, const T_HASH &ahash, const T &acont) |
set identifier and value of entry bnr, position colnr | |
int | CheckPosition (int bnr, const T_HASH &ind) const |
returns position of index. returns -1 on unused | |
int | Position (int bnr, const T_HASH &ind) const |
returns position of index. exception on unused |
A hash-table.
Generic identifiers are mapped to the generic type T. An open hashtable. The table is implemented by a {DynamicTable}. Identifiers must provide a {HashValue} function.