A HashTable with keys but without contents. More...


Public Types | |
| typedef HashTable< nil, Key, Hash >::iterator | iterator |
| typedef HashTable< nil, Key, Hash >::const_iterator | const_iterator |
Public Types inherited from HashTable< nil, word, string::hash > | |
| typedef nil | value_type |
| Type of values the HashTable contains. More... | |
| typedef nil & | reference |
| Type that can be used for storing into HashTable::value_type. More... | |
| typedef const nil & | const_reference |
| Type that can be used for storing into constant. More... | |
| typedef label | size_type |
| The type that can represent the size of a HashTable. More... | |
Public Member Functions | |
| HashSet (const label size=128) | |
| Construct given initial size. More... | |
| HashSet (Istream &is) | |
| Construct from Istream. More... | |
| HashSet (const UList< Key > &) | |
| Construct from UList of Key. More... | |
| template<unsigned Size> | |
| HashSet (const FixedList< Key, Size > &) | |
| Construct from FixedList of Key. More... | |
| HashSet (const HashSet< Key, Hash > &hs)=default | |
| Copy constructor. More... | |
| HashSet (HashSet< Key, Hash > &&hs)=default | |
| Move constructor. More... | |
| template<class AnyType , class AnyHash > | |
| HashSet (const HashTable< AnyType, Key, AnyHash > &) | |
| Construct from the keys of another HashTable,. More... | |
| HashSet (std::initializer_list< Key >) | |
| Construct from an initialiser list. More... | |
| bool | insert (const Key &key) |
| Insert a new entry. More... | |
| label | insert (const UList< Key > &) |
| Insert keys from a UList of Key. More... | |
| label | insert (const HashSet< Key, Hash > &) |
| Insert keys from a HashSet of Key. More... | |
| bool | set (const Key &key) |
| Same as insert (cannot overwrite nil content) More... | |
| label | set (const UList< Key > &lst) |
| Same as insert (cannot overwrite nil content) More... | |
| bool | unset (const Key &key) |
| Unset the specified key - same as erase. More... | |
| bool | operator[] (const Key &) const |
| Return true if the entry exists, same as found() More... | |
| void | operator= (const HashSet< Key, Hash > &) |
| Assignment operator. More... | |
| void | operator= (HashSet< Key, Hash > &&) |
| Move assignment operator. More... | |
| bool | operator== (const HashSet< Key, Hash > &) const |
| Equality. Two hashtables are equal when their contents are equal. More... | |
| bool | operator!= (const HashSet< Key, Hash > &) const |
| The opposite of the equality operation. More... | |
| void | operator|= (const HashSet< Key, Hash > &) |
| Combine entries from HashSets. More... | |
| void | operator&= (const HashSet< Key, Hash > &) |
| Only retain entries found in both HashSets. More... | |
| void | operator^= (const HashSet< Key, Hash > &) |
| Only retain unique entries (xor) More... | |
| void | operator+= (const HashSet< Key, Hash > &rhs) |
| Add entries listed in the given HashSet to this HashSet. More... | |
| void | operator-= (const HashSet< Key, Hash > &) |
| Remove entries listed in the given HashSet from this HashSet. More... | |
Public Member Functions inherited from HashTable< nil, word, string::hash > | |
| bool | set (const word &, const nil &newElmt) |
| Set a new hashedEntry, overwriting existing entries. More... | |
| void | set (const HashTable< nil, word, string::hash > &) |
| Insert all the entries from the given HashTable,. More... | |
| HashTable (const label size=128) | |
| Construct given initial table size. More... | |
| HashTable (Istream &, const label size=128) | |
| Construct from Istream. More... | |
| HashTable (const UList< word > &keyList, const UList< nil > &elmtList) | |
| Construct from a list of keys and list of elements. More... | |
| HashTable (const HashTable< nil, word, string::hash > &) | |
| Copy constructor. More... | |
| HashTable (HashTable< nil, word, string::hash > &&) | |
| Move constructor. More... | |
| HashTable (std::initializer_list< Tuple2< word, nil >>) | |
| Construct from an initialiser list. More... | |
| ~HashTable () | |
| Destructor. More... | |
| label | capacity () const |
| The size of the underlying table. More... | |
| label | size () const |
| Return number of elements in table. More... | |
| bool | empty () const |
| Return true if the hash table is empty. More... | |
| bool | found (const word &) const |
| Return true if hashedEntry is found in table. More... | |
| iterator | find (const word &) |
| Find and return an iterator set at the hashedEntry. More... | |
| const_iterator | find (const word &) const |
| Find and return an const_iterator set at the hashedEntry. More... | |
| List< word > | toc () const |
| Return the table of contents. More... | |
| List< word > | sortedToc () const |
| Return the table of contents as a sorted list. More... | |
| List< const_iterator > | sorted () const |
| Return a sorted list of constant iterators. More... | |
| Ostream & | printInfo (Ostream &) const |
| Print information. More... | |
| bool | insert (const word &, const nil &newElmt) |
| Insert a new hashedEntry. More... | |
| void | insert (const HashTable< nil, word, string::hash > &) |
| Insert all the entries from the given HashTable. More... | |
| bool | erase (const iterator &) |
| Erase a hashedEntry specified by given iterator. More... | |
| bool | erase (const word &) |
| Erase a hashedEntry specified by the given key. More... | |
| label | erase (const UList< word > &) |
| Remove entries given by the listed keys from this HashTable. More... | |
| label | erase (const HashTable< AnyType, word, AnyHash > &) |
| Remove entries given by the given keys from this HashTable. More... | |
| Foam::label | erase (const HashTable< AnyType, word, AnyHash > &rhs) |
| void | resize (const label newSize) |
| Resize the hash table for efficiency. More... | |
| void | clear () |
| Clear all entries from table. More... | |
| void | clearStorage () |
| Clear the table entries and the table itself. More... | |
| void | shrink () |
| Shrink the allocated table to approx. twice number of elements. More... | |
| void | transfer (HashTable< nil, word, string::hash > &) |
| Transfer the contents of the argument table into this table. More... | |
| nil & | operator[] (const word &) |
| Find and return a hashedEntry. More... | |
| const nil & | operator[] (const word &) const |
| Find and return a hashedEntry. More... | |
| nil & | operator() (const word &) |
| Find and return a hashedEntry, create it null if not present. More... | |
| void | operator= (const HashTable< nil, word, string::hash > &) |
| Assignment operator. More... | |
| void | operator= (HashTable< nil, word, string::hash > &&) |
| Move assignment operator. More... | |
| void | operator= (std::initializer_list< Tuple2< word, nil >>) |
| Assignment to an initialiser list. More... | |
| bool | operator== (const HashTable< nil, word, string::hash > &) const |
| Equality. Hash tables are equal if the keys and values are equal. More... | |
| bool | operator!= (const HashTable< nil, word, string::hash > &) const |
| The opposite of the equality operation. Takes linear time. More... | |
| iterator | begin () |
| Iterator set to the beginning of the HashTable. More... | |
| const_iterator | begin () const |
| const_iterator set to the beginning of the HashTable More... | |
| const_iterator | cbegin () const |
| const_iterator set to the beginning of the HashTable More... | |
Public Member Functions inherited from HashTableCore | |
| HashTableCore () | |
| Construct null. More... | |
| ClassName ("HashTable") | |
| Define template name and debug. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from HashTableCore | |
| static label | canonicalSize (const label) |
| Return a canonical (power-of-two) size. More... | |
| static iteratorEnd | cend () |
| iteratorEnd set to beyond the end of any HashTable More... | |
| static iteratorEnd | end () |
| iteratorEnd set to beyond the end of any HashTable More... | |
Static Public Attributes inherited from HashTableCore | |
| static const label | maxTableSize |
| Maximum allowable table size. More... | |
A HashTable with keys but without contents.
| typedef HashTable<nil, Key, Hash>::const_iterator const_iterator |
Construct from UList of Key.
Definition at line 34 of file HashSet.C.
References forAll, and HashSet< Key, Hash >::insert().

Construct from FixedList of Key.
Definition at line 47 of file HashSet.C.
References forAll, and HashSet< Key, Hash >::insert().

Construct from the keys of another HashTable,.
the type of values held is arbitrary.
Definition at line 60 of file HashSet.C.
References Foam::constant::universal::h, and HashSet< Key, Hash >::insert().

| HashSet | ( | std::initializer_list< Key > | lst | ) |
|
inline |
Insert a new entry.
Definition at line 109 of file HashSet.H.
References HashTable< T, Key, Hash >::insert().
Referenced by snappyLayerDriver::addLayers(), topoSetSource::addOrDelete(), LagrangianMesh::appendSpecifiedFields(), normalToFace::applyToSet(), decompositionMethod::calcCellCells(), cellToFaceStencil::calcFaceStencil(), cellFeatures::cellFeatures(), Foam::meshCheck::checkCellDeterminant(), Foam::meshCheck::checkCellsZipUp(), Foam::meshCheck::checkCellVolumes(), Foam::meshCheck::checkClosedCells(), Foam::meshCheck::checkCommonOrder(), Foam::meshCheck::checkConcaveCells(), Foam::meshCheck::checkCoupledPoints(), Zone< ZoneType, ZonesType >::checkDefinition(), Foam::meshCheck::checkDuplicateFaces(), Foam::meshCheck::checkEdgeAlignment(), Foam::meshCheck::checkEdgeLength(), Foam::meshCheck::checkFaceAngles(), Foam::meshCheck::checkFaceArea(), Foam::meshCheck::checkFaceAreas(), Foam::meshCheck::checkFaceFlatness(), Foam::meshCheck::checkFaceOrthogonality(), Foam::meshCheck::checkFacePyramids(), Foam::meshCheck::checkFaceSkewness(), Foam::meshCheck::checkFaceTet(), Foam::meshCheck::checkFaceTets(), polyMeshTetDecomposition::checkFaceTets(), Foam::meshCheck::checkFaceTwist(), Foam::meshCheck::checkFaceVertices(), Foam::meshCheck::checkFaceWeight(), Foam::meshCheck::checkFaceWeights(), Foam::meshCheck::checkNonOrtho(), PatchTools::checkOrientation(), PrimitivePatch< FaceList, PointField >::checkPointManifold(), Foam::meshCheck::checkPointNearness(), Foam::meshCheck::checkPoints(), PrimitivePatch< FaceList, PointField >::checkTopology(), Foam::meshCheck::checkTopology(), Foam::meshCheck::checkTriangleTwist(), Foam::meshCheck::checkUpperTriangular(), Foam::meshCheck::checkVolRatio(), Foam::meshCheck::checkWedges(), hexRef8::consistentSlowRefinement2(), meshRefinement::createBaffles(), multiValveEngine::movingObject::createStaticPatchSet(), curvatureSeparation::curvatureSeparation(), geomCellLooper::cut(), hexCellLooper::cut(), Foam::meshTools::cutDirToEdge(), structured::decompose(), fvMeshDistribute::distribute(), meshRefinement::doRemovePoints(), meshRefinement::doRestorePoints(), polyBoundaryMesh::findIndices(), Foam::meshCheck::getAffectedCells(), surfaceSets::getHangingCells(), combineFaces::getMergeSets(), surfaceSets::getSurfaceSets(), removePoints::getUnrefimentSet(), triSurfaceTools::getVertexVertices(), HashSet< Key, Hash >::HashSet(), faceZone::insert(), Zone< ZoneType, ZonesType >::insert(), cellToCellStencil::insertFaceCells(), cellToFaceStencil::insertFaceCells(), Foam::interpolatePointToCell(), Foam::listConfigFiles(), Foam::listSwitches(), cellToCellStencil::merge(), cellToFaceStencil::merge(), Foam::mergeDictionaries(), meshRefinement::mergePatchFacesUndo(), multiValveEngine::movingObject::movingPointZones(), inversePointDistanceDiffusivity::operator()(), cellToCellStencil::unionEqOp::operator()(), cellToFaceStencil::unionEqOp::operator()(), ParticleErosion< CloudType >::ParticleErosion(), PatchPostProcessing< CloudType >::PatchPostProcessing(), polyBoundaryMesh::patchSet(), Foam::polyMeshZipUpCells(), probes::prepare(), wallHeatFlux::read(), wallHeatTransferCoeff::read(), wallShearStress::read(), NASsurfaceFormat< Face >::read(), Foam::readDir(), refiner::refiner(), structuredRenumber::renumber(), motionSmootherAlgo::scaleMesh(), distributionMapBase::schedule(), Zone< cellZone, cellZoneList >::select(), HashSet< Key, Hash >::set(), removePoints::setRefinement(), perfectInterface::setRefinement(), hexRef8::setRefinement(), addPatchCellLayer::setRefinement(), hexRef8::setUnrefinement(), multiValveEngine::movingObject::staticPointZones(), surfaceIntersection::surfaceIntersection(), pointSet::sync(), Zone< ZoneType, ZonesType >::topoChange(), TriPatchIntersection< SrcPatchType, TgtPatchType >::TriPatchIntersection(), topoSet::updateLabels(), edgeVertex::updateLabels(), AC3DsurfaceFormat< Face >::write(), ZoneList< pointZone, pointZoneList, polyMesh >::writeData(), and Foam::meshTools::writeOBJ().


| Foam::label insert | ( | const UList< Key > & | lst | ) |
| Foam::label insert | ( | const HashSet< Key, Hash > & | set | ) |
|
inline |
Same as insert (cannot overwrite nil content)
Definition at line 123 of file HashSet.H.
References HashSet< Key, Hash >::insert().
Referenced by tetIndices::faceTriIs(), and snappyLayerDriver::mergePatchFacesUndo().


Same as insert (cannot overwrite nil content)
Definition at line 129 of file HashSet.H.
References HashSet< Key, Hash >::insert().

|
inline |
Unset the specified key - same as erase.
Definition at line 135 of file HashSet.H.
References HashTable< T, Key, Hash >::erase().
Referenced by snappyLayerDriver::mergePatchFacesUndo().


|
inline |
Equality. Two hashtables are equal when their contents are equal.
Independent of table size or order.
Definition at line 169 of file HashSet.C.
References HashTable< T, Key, Hash >::found().

The opposite of the equality operation.
Definition at line 194 of file HashSet.C.
References Foam::operator==().

Combine entries from HashSets.
Definition at line 201 of file HashSet.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), and Foam::vtkWriteOps::insert().
Referenced by HashSet< Key, Hash >::operator+=().


Only retain entries found in both HashSets.
Definition at line 212 of file HashSet.C.
References erase(), and HashTable< T, Key, Hash >::found().

Only retain unique entries (xor)
Definition at line 226 of file HashSet.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), erase(), found, and Foam::vtkWriteOps::insert().

Add entries listed in the given HashSet to this HashSet.
Definition at line 170 of file HashSet.H.
References HashSet< Key, Hash >::operator|=().

Remove entries listed in the given HashSet from this HashSet.
Definition at line 244 of file HashSet.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), and erase().
