51 #include <initializer_list> 60 template<
class T>
class List;
62 template<
class T,
class Key,
class Hash>
class HashTable;
63 template<
class T,
class Key,
class Hash>
class HashPtrTable;
65 template<
class Type1,
class Type2>
68 template<
class T,
class Key,
class Hash>
71 template<
class T,
class Key,
class Hash>
74 template<
class T,
class Key,
class Hash>
75 Ostream& operator<<(Ostream&, const HashTable<T, Key, Hash>&);
124 template<
class T,
class Key=word,
class Hash=
string::hash>
144 inline hashedEntry(
const Key&, hashedEntry* next,
const T&);
147 hashedEntry(
const hashedEntry&) =
delete;
150 void operator=(
const hashedEntry&) =
delete;
163 hashedEntry** table_;
173 inline label hashKeyIndex(
const Key&)
const;
176 bool set(
const Key&,
const T& newElmt,
bool protect);
185 class const_iterator;
188 template<
class T2,
class Key2,
class Hash2>
192 friend class iteratorBase;
195 friend class iterator;
198 friend class const_iterator;
228 inline label capacity()
const;
231 inline label size()
const;
234 inline bool empty()
const;
237 bool found(
const Key&)
const;
241 iterator find(
const Key&);
245 const_iterator find(
const Key&)
const;
260 inline bool insert(
const Key&,
const T& newElmt);
263 inline bool set(
const Key&,
const T& newElmt);
267 bool erase(
const iterator&);
270 bool erase(
const Key&);
280 template<
class AnyType,
class AnyHash>
304 inline T& operator[](
const Key&);
307 inline const T& operator[](
const Key&)
const;
310 inline T& operator()(
const Key&);
364 hashedEntry* entryPtr_;
387 const hashedEntry* elmt,
388 const label hashIndex
395 inline void increment();
404 inline const T& cobject()
const;
414 inline const Key& key()
const;
446 const label hashIndex
465 inline T& operator()();
469 inline const T& operator()()
const;
500 const hashedEntry* elmt,
501 const label hashIndex
523 inline const T& operator()()
const;
546 friend Ostream& operator<< <T, Key, Hash>
A zero-sized end iterator.
tmp< fvMatrix< Type > > operator*(const volScalarField::Internal &, const fvMatrix< Type > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An STL-conforming const_iterator.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
A 2-tuple for storing two objects of different types.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
ClassName("HashTable")
Define template name and debug.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A HashTable specialisation for hashing pointers.
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
HashTableCore()
Construct null.
An STL-conforming iterator.
An ordered pair of two objects of type <T> with first() and second() elements.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)
triSurfaceToAgglom resize(surfacesMesh.size())
static const label maxTableSize
Maximum allowable table size.
An STL-conforming hash table.
graph_traits< Graph >::vertices_size_type size_type
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Template-invariant bits for HashTable.
static label canonicalSize(const label)
Return a canonical (power-of-two) size.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Hash function class for primitives. All non-primitives used to hash entries on hash tables likely nee...
iteratorEnd()
Construct null.
bool operator!=(const particle &, const particle &)
The iterator base for HashTable.
static iteratorEnd cend()
iteratorEnd set to beyond the end of any HashTable