57 template<
class Type,
class Key=word,
class Hash=
string::hash>
89 bool insert(
const Key&
k,
const Type& t);
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
HashList class. Like HashTable, but much less dynamic memory-y. Should be faster for small sets of no...
HashList(const label size)
Construct given a size.
void resizeAndClear(const label newSize)
Resize and clear all elements.
label capacity() const
The size of the underlying list.
const Type & operator[](const Key &k) const
Retrieve from the hash list.
bool insert(const Key &k, const Type &t)
Insert into the hash list. Return true if the value was newly.
static const Key nullKey
Null key value for unset elements in the list.
void clear()
Clear all elements.
label size() const
Return the number of elements in the UList.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.