A HashTable with keys but without contents. More...
#include <OpenFOAM/HashSet.H>
A HashTable with keys but without contents.
Definition at line 58 of file HashSet.H.
Public Types | |
typedef HashTable< nil, Key, Hash >::iterator | iterator |
typedef HashTable< nil, Key, Hash >::const_iterator | const_iterator |
Public Member Functions | |
HashSet (const label size=128) | |
Construct given initial size.
| |
HashSet (Istream &is) | |
Construct from Istream.
| |
HashSet (const UList< Key > &lst) | |
Construct from UList of Key.
| |
HashSet (const HashSet< Key, Hash > &hs) | |
Construct as copy.
| |
HashSet (const Xfer< HashSet< Key, Hash > > &hs) | |
Construct by transferring the parameter contents.
| |
HashSet (const Xfer< HashTable< nil, Key, Hash > > &hs) | |
Construct by transferring the parameter contents.
| |
template<class AnyType , class AnyHash > | |
HashSet (const HashTable< AnyType, Key, AnyHash > &) | |
Construct from the keys of another HashTable,.
| |
bool | insert (const Key &key) |
Insert a new entry.
| |
bool | set (const Key &key) |
Same as insert (cannot overwrite nil content)
| |
bool | operator[] (const Key &) const |
Return true if the entry exists, same as found()
| |
bool | operator== (const HashSet< Key, Hash > &) const |
Equality. Two hashtables are equal when their contents are equal.
| |
bool | operator!= (const HashSet< Key, Hash > &) const |
The opposite of the equality operation.
| |
void | operator|= (const HashSet< Key, Hash > &) |
Combine entries from HashSets.
| |
void | operator&= (const HashSet< Key, Hash > &) |
Only retain entries found in both HashSets.
| |
void | operator^= (const HashSet< Key, Hash > &) |
Only retain unique entries (xor)
| |
void | operator+= (const HashSet< Key, Hash > &rhs) |
Add entries listed in the given HashSet to this HashSet.
| |
void | operator-= (const HashSet< Key, Hash > &) |
Remove entries listed in the given HashSet from this HashSet.
|
Reimplemented from HashTable< nil, Key, Hash >.
typedef HashTable<nil, Key, Hash>::const_iterator const_iterator |
Reimplemented from HashTable< nil, Key, Hash >.
HashSet | ( | const label | size = 128
) |
[inline]
|
Construct from the keys of another HashTable,.
the type of values held is arbitrary.
Definition at line 36 of file HashSet.C.
References HashTable< T, Key, Hash >::cbegin(), HashTable< T, Key, Hash >::cend(), and insert().
bool insert | ( | const Key & | key ) | [inline]
|
Insert a new entry.
Definition at line 123 of file HashSet.H.
Referenced by meshRefinement::baffleAndSplitMesh(), cellToFaceStencil::calcFaceStencil(), primitiveMesh::checkCellDeterminant(), primitiveMeshGeometry::checkCellDeterminant(), polyMeshGeometry::checkCellDeterminant(), primitiveMesh::checkCellsZipUp(), primitiveMesh::checkCellVolumes(), primitiveMesh::checkClosedCells(), primitiveMesh::checkEdgeAlignment(), primitiveMesh::checkEdgeLength(), primitiveMesh::checkFaceAngles(), primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), primitiveMeshGeometry::checkFaceArea(), polyMeshGeometry::checkFaceArea(), primitiveMesh::checkFaceAreas(), primitiveMeshGeometry::checkFaceDotProduct(), primitiveMesh::checkFaceFlatness(), primitiveMesh::checkFaceOrthogonality(), primitiveMesh::checkFacePyramids(), primitiveMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFacePyramids(), primitiveMesh::checkFaceSkewness(), primitiveMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceSkewness(), primitiveMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceTwist(), primitiveMesh::checkFaceVertices(), primitiveMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkFaceWeights(), PatchTools::checkOrientation(), PrimitivePatch< Face, FaceList, PointField, PointType >::checkPointManifold(), primitiveMesh::checkPointNearness(), primitiveMesh::checkPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::checkTopology(), polyMeshGeometry::checkTriangleTwist(), primitiveMesh::checkUpperTriangular(), polyMeshGeometry::checkVolRatio(), meshRefinement::createBaffles(), geomCellLooper::cut(), treeLeaf< Type >::findBox(), meshRefinement::getDuplicateFaces(), combineFaces::getMergeSets(), surfaceSets::getSurfaceSets(), triSurfaceTools::getVertexVertices(), HashSet< word >::HashSet(), HashSet< word >::insert(), cellToFaceStencil::insertFaceCells(), cellToCellStencil::insertFaceCells(), meshRefinement::mergeEdges(), polyBoundaryMesh::patchSet(), Foam::polyMeshZipUpCells(), NASsurfaceFormat< Face >::read(), motionSmoother::scaleMesh(), mapDistribute::schedule(), HashSet< word >::set(), TimeActivatedExplicitSource< Type >::setCellSet(), removePoints::setRefinement(), explicitSource::setSelectedCellsFromPoints(), surfaceIntersection::surfaceIntersection(), pointSet::sync(), and STARCD::writeSurface().
bool set | ( | const Key & | key ) | [inline]
|
bool operator[] | ( | const Key & | key ) | const [inline]
|
Return true if the entry exists, same as found()
Reimplemented from HashTable< nil, Key, Hash >.
Equality. Two hashtables are equal when their contents are equal.
Independent of table size or order.
Definition at line 65 of file HashSet.C.
References HashTable< nil, Key, Hash >::cbegin(), HashTable< nil, Key, Hash >::cend(), and HashTable< nil, Key, Hash >::found().
The opposite of the equality operation.
Definition at line 90 of file HashSet.C.
References Foam::operator==().
Combine entries from HashSets.
Definition at line 97 of file HashSet.C.
References HashTable< nil, Key, Hash >::cbegin(), HashTable< nil, Key, Hash >::cend(), and insert().
Referenced by HashSet< word >::operator+=().
Only retain entries found in both HashSets.
Definition at line 108 of file HashSet.C.
References HashTable< nil, Key, Hash >::found().
Only retain unique entries (xor)
Definition at line 122 of file HashSet.C.
References HashTable< nil, Key, Hash >::cbegin(), HashTable< nil, Key, Hash >::cend(), and insert().
Remove entries listed in the given HashSet from this HashSet.
Definition at line 141 of file HashSet.C.
References HashTable< nil, Key, Hash >::cbegin(), and HashTable< nil, Key, Hash >::cend().