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 |
![]() | |
typedef T | value_type |
Type of values the HashTable contains. More... | |
typedef T & | reference |
Type that can be used for storing into HashTable::value_type. 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... | |
HashSet (const HashSet< Key, Hash > &hs) | |
Construct as copy. More... | |
HashSet (const Xfer< HashSet< Key, Hash > > &hs) | |
Construct by transferring the parameter contents. More... | |
HashSet (const Xfer< HashTable< nil, Key, Hash > > &hs) | |
Construct by transferring the parameter contents. More... | |
template<class AnyType , class AnyHash > | |
HashSet (const HashTable< AnyType, Key, AnyHash > &) | |
Construct from the keys of another HashTable,. More... | |
bool | insert (const Key &key) |
Insert a new entry. More... | |
label | insert (const UList< Key > &) |
Insert keys from a UList 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... | |
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... | |
![]() | |
bool | set (const Key &, const T &newElmt) |
Assign a new hashedEntry, overwriting existing entries. More... | |
HashTable (const label size=128) | |
Construct given initial table size. More... | |
HashTable (Istream &, const label size=128) | |
Construct from Istream. More... | |
HashTable (const HashTable< T, Key, Hash > &) | |
Construct as copy. More... | |
HashTable (const Xfer< HashTable< T, Key, Hash > > &) | |
Construct by transferring the parameter contents. 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 Key &) const |
Return true if hashedEntry is found in table. More... | |
iterator | find (const Key &) |
Find and return an iterator set at the hashedEntry. More... | |
const_iterator | find (const Key &) const |
Find and return an const_iterator set at the hashedEntry. More... | |
List< Key > | toc () const |
Return the table of contents. More... | |
List< Key > | sortedToc () const |
Return the table of contents as a sorted list. More... | |
Ostream & | printInfo (Ostream &) const |
Print information. More... | |
bool | insert (const Key &, const T &newElmt) |
Insert a new hashedEntry. More... | |
bool | erase (const iterator &) |
Erase a hashedEntry specified by given iterator. More... | |
bool | erase (const Key &) |
Erase a hashedEntry specified by the given key. More... | |
label | erase (const UList< Key > &) |
Remove entries given by the listed keys from this HashTable. More... | |
label | erase (const HashTable< AnyType, Key, AnyHash > &) |
Remove entries given by the given keys from this HashTable. More... | |
Foam::label | erase (const HashTable< AnyType, Key, 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< T, Key, Hash > &) |
Transfer the contents of the argument table into this table. More... | |
Xfer< HashTable< T, Key, Hash > > | xfer () |
Transfer contents to the Xfer container. More... | |
T & | operator[] (const Key &) |
Find and return a hashedEntry. More... | |
const T & | operator[] (const Key &) const |
Find and return a hashedEntry. More... | |
T & | operator() (const Key &) |
Find and return a hashedEntry, create it null if not present. More... | |
void | operator= (const HashTable< T, Key, Hash > &) |
Assignment. More... | |
bool | operator== (const HashTable< T, Key, Hash > &) const |
Equality. Hash tables are equal if the keys and values are equal. More... | |
bool | operator!= (const HashTable< T, Key, 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... | |
Additional Inherited Members | |
![]() | |
const typedef T & | const_reference |
Type that can be used for storing into constant. More... | |
A HashTable with keys but without contents.
typedef HashTable<nil, Key, Hash>::const_iterator const_iterator |
|
inline |
Insert a new entry.
Definition at line 116 of file HashSet.H.
Referenced by polyMeshGenModifier::addBufferCells(), layerAdditionRemoval::addCellLayer(), refineImmersedBoundaryMesh::addIbCellCellFaces(), refineImmersedBoundaryMesh::addIbCellCells(), refineImmersedBoundaryMesh::addIbCells(), immersedBoundaryFvPatch::addIbCornerCells(), topoSetSource::addOrDelete(), primitiveMeshGeometry::affectedCells(), polyMeshGeometry::affectedCells(), fieldToCell::applyToSet(), normalToFace::applyToSet(), attachDetach::attachInterface(), cellCuts::calcAnchors(), slidingInterface::calcAttachedAddressing(), PrimitivePatch< labelledTri, List, pointField, point >::calcBdryPoints(), decompositionMethod::calcCellCells(), enrichedPatch::calcCutFaces(), FECCellToFaceStencil::calcFaceStencil(), cellToFaceStencil::calcFaceStencil(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), regionSplit::calcRegionSplit(), isoSurfaceCell::calcSnappedPoint(), faceHeatShading::calculate(), faceShading::calculate(), solarLoad::calculate(), solarHeatLoad::calculate(), meshSurfaceEngine::calculateBoundaryNodes(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), triSurfAddressing::calculateFacetFacetsEdges(), canopySource::calculatePatchDistance(), triSurfaceCurvatureEstimator::calculateSurfaceCurvatures(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), meshOctreeAddressing::checkAndFixIrregularConnections(), primitiveMeshGeometry::checkCellDeterminant(), polyMesh::checkCellDeterminant(), polyMeshGeometry::checkCellDeterminant(), primitiveMesh::checkCellDeterminant(), Foam::polyMeshGenChecks::checkCellPartTetrahedra(), Foam::polyMeshGenChecks::checkCellsZipUp(), primitiveMesh::checkCellsZipUp(), Foam::polyMeshGenChecks::checkCellVolumes(), primitiveMesh::checkCellVolumes(), Foam::polyMeshGenChecks::checkClosedCells(), primitiveMesh::checkClosedCells(), primitiveMesh::checkCommonOrder(), primitiveMesh::checkConcaveCells(), edgeExtractor::checkCorners(), Foam::checkCoupledPoints(), zone::checkDefinition(), primitiveMesh::checkDuplicateFaces(), polyMesh::checkEdgeAlignment(), primitiveMesh::checkEdgeAlignment(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), primitiveMesh::checkEdgeLength(), primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), primitiveMesh::checkFaceAngles(), Foam::polyMeshGenChecks::checkFaceAngles(), primitiveMeshGeometry::checkFaceArea(), polyMeshGeometry::checkFaceArea(), Foam::polyMeshGenChecks::checkFaceAreas(), primitiveMesh::checkFaceAreas(), decomposeCells::checkFaceConnections(), primitiveMeshGeometry::checkFaceDotProduct(), Foam::polyMeshGenChecks::checkFaceDotProduct(), polyMeshGeometry::checkFaceFlatness(), primitiveMesh::checkFaceFlatness(), Foam::polyMeshGenChecks::checkFaceFlatness(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), polyMesh::checkFaceOrthogonality(), primitiveMesh::checkFaceOrthogonality(), primitiveMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFacePyramids(), primitiveMesh::checkFacePyramids(), Foam::polyMeshGenChecks::checkFacePyramids(), primitiveMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceSkewness(), polyMesh::checkFaceSkewness(), primitiveMesh::checkFaceSkewness(), Foam::polyMeshGenChecks::checkFaceSkewness(), polyMeshGeometry::checkFaceTet(), polyMeshTetDecomposition::checkFaceTets(), polyMeshGeometry::checkFaceTets(), primitiveMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceTwist(), Foam::polyMeshGenChecks::checkFaceUniformity(), Foam::polyMeshGenChecks::checkFaceVertices(), primitiveMesh::checkFaceVertices(), polyMesh::checkFaceWeight(), primitiveMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkFaceWeights(), meshOctreeAddressing::checkGluedRegions(), topologicalCleaner::checkInvalidConnectionsForVerticesCells(), autoLayerDriver::checkManifold(), polyMeshGeometry::checkNonOrtho(), PatchTools::checkOrientation(), PrimitivePatch< labelledTri, List, pointField, point >::checkPointManifold(), primitiveMesh::checkPointNearness(), Foam::polyMeshGenChecks::checkPoints(), primitiveMesh::checkPoints(), Foam::checkTopology(), PrimitivePatch< labelledTri, List, pointField, point >::checkTopology(), boundaryLayers::checkTopologyOfBoundaryFaces(), polyMeshGeometry::checkTriangleTwist(), Foam::polyMeshGenChecks::checkUpperTriangular(), primitiveMesh::checkUpperTriangular(), meshSurfaceCheckInvertedVertices::checkVertices(), polyMeshGeometry::checkVolRatio(), polyMesh::checkVolRatio(), Foam::checkWedges(), hexRef8::consistentSlowRefinement2(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), slidingInterface::coupleInterface(), meshRefinement::createBaffles(), boundaryLayers::createLayerCells(), curvatureSeparation::curvatureSeparation(), hexCellLooper::cut(), geomCellLooper::cut(), Foam::meshTools::cutDirToEdge(), autoRefineDriver::danglingCellRefine(), structuredDecomp::decompose(), slidingInterface::decoupleInterface(), attachDetach::detachInterface(), MGridGenGAMGAgglomeration::detectSharedFaces(), edgeCollapser::determineDuplicatePointsOnFace(), fvMeshDistribute::distribute(), meshRefinement::doRemovePoints(), meshRefinement::doRestorePoints(), dynamicRefineFvMesh::dynamicRefineFvMesh(), meshOctreeModifier::ensureCorrectRegularity(), Foam::help::exchangeMap(), combineFaces::faceNeighboursValid(), surfaceIntersection::filterEdges(), surfaceIntersection::filterLabels(), findBaffles(), surfaceMorpherCells::findBoundaryVertices(), indexedOctree< Foam::treeDataFace >::findBox(), dynamicIndexedOctree::findBox(), immersedBoundaryFvPatch::findCellCells(), checkNonMappableCellConnections::findCells(), meshOctreeCube::findContainedEdges(), meshRefinement::findEdgeConnectedProblemCells(), polyBoundaryMesh::findIndices(), findCellsIntersectingSurface::findIntersectedCells(), meshOctree::findNearestCorner(), boundaryLayers::findPatchesToBeTreatedTogether(), polyBoundaryMesh::findPatchIDs(), checkBoundaryFacesSharingTwoEdges::findPoints(), faceCoupleInfo::findSlavesCoveringMaster(), indexedOctree< Foam::treeDataFace >::findSphere(), dynamicIndexedOctree::findSphere(), meshOctreeAddressing::findUsedBoxes(), Foam::polyMeshGenChecks::findWorstQualityFaces(), motionSmootherAlgo::getAffectedFacesAndPoints(), triSurfaceTools::getCollapsedFaces(), surfaceSets::getHangingCells(), triSurfaceTools::getMergedEdges(), combineFaces::getMergeSets(), cellDistFuncs::getPatchIDs(), cellDistFuncs::getPointNeighbours(), motionSmootherAlgo::getPoints(), Foam::vtkPV3Readers::getSelected(), Foam::vtkPV4Readers::getSelected(), vtkPV3blockMesh::getSelected(), vtkPV4blockMesh::getSelected(), vtkPV3Foam::getSelected(), vtkPV4Foam::getSelected(), polyTopoChange::getSetIndices(), surfaceSets::getSurfaceSets(), removePoints::getUnrefimentSet(), triSurfaceTools::getVertexVertices(), autoLayerDriver::handleNonManifolds(), meshRefinement::handleSnapProblems(), globalPoints::initOwnPoints(), injectionModelList::injectionModelList(), faceCollapser::insert(), cellToFaceStencil::insertFaceCells(), cellToCellStencil::insertFaceCells(), Foam::interpolatePointToCell(), meshOctreeModifier::loadDistribution(), main(), immersedBoundaryFvPatch::makeIbCellCells(), immersedBoundaryFvPatch::makeIbCells(), immersedBoundaryFvPatch::makeIbInsideFaces(), immersedBoundaryFvPatch::makeIbInternalFaces(), immersedBoundaryFvPatch::makeTriAddressing(), meshOctreeModifier::markAdditionalLayers(), meshOctreeModifier::markAdditionalLayersOfFaceNeighbours(), cellClassification::markCells(), meshRefinement::markFacesOnProblemCells(), cellToCellStencil::merge(), cellToFaceStencil::merge(), merge(), meshRefinement::mergePatchFaces(), meshRefinement::mergePatchFacesUndo(), polyMeshAdder::mergePrimitives(), fvMeshDistribute::mergeWordList(), Foam::help::numberOfEdgeGroups(), Foam::help::numberOfFaceGroups(), cellToCellStencil::unionEqOp::operator()(), cellToFaceStencil::unionEqOp::operator()(), InflationInjection< CloudType >::parcelsToInject(), ParticleErosion< CloudType >::ParticleErosion(), PatchPostProcessing< CloudType >::PatchPostProcessing(), polyBoundaryMesh::patchSet(), Foam::polyMeshZipUpCells(), probes::prepare(), slidingInterface::projectPoints(), NASsurfaceFormat< Face >::read(), wallShearStress::read(), triSurface::readNAS(), globalPoints::receivePatchPoints(), dynamicRefineFvMesh::refine(), meshOctreeAutomaticRefinement::refineBasedOnProximityTests(), meshOctreeCreator::refineBoxesNearDataBoxes(), autoRefineDriver::refinementInterfaceRefine(), layerAdditionRemoval::removeCellLayer(), structuredRenumber::renumber(), polyTopoChange::renumber(), reorderMesh(), faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace(), meshOctreeInsideOutside::reviseDataBoxes(), motionSmootherAlgo::scaleMesh(), mapDistributeBase::schedule(), HashSet< label, Hash< label > >::set(), cellSetOption::setCellSet(), pairPatchAgglomeration::setEdgeWeights(), MRFZone::setMRFFaces(), perfectInterface::setRefinement(), removePoints::setRefinement(), removeFaces::setRefinement(), addPatchCellLayer::setRefinement(), hexRef8::setRefinement(), hexRef8::setUnrefinement(), meshRefinement::splitFacesUndo(), surfaceIntersection::surfaceIntersection(), pointSet::sync(), faceSet::sync(), extendedUpwindCellToFaceStencil::transportStencil(), updateCellSet(), meshOctreeModifier::updateCommunicationPattern(), topoSet::updateLabels(), edgeVertex::updateLabels(), cellZoneSet::updateSet(), pointZoneSet::updateSet(), faceZoneSet::updateSet(), vtkUnstructuredReader::warnUnhandledType(), AC3DsurfaceFormat< Face >::write(), polyMeshGenPoints::write(), polyMeshGenCells::write(), polyMeshGenFaces::write(), domainDecomposition::writeDecomposition(), autoLayerDriver::writeLayerSets(), Foam::meshTools::writeOBJ(), and polyMeshGenModifier::zipUpCells().
Foam::label insert | ( | const UList< Key > & | lst | ) |
|
inline |
Same as insert (cannot overwrite nil content)
Definition at line 126 of file HashSet.H.
Referenced by cellZoneSet::addSet(), pointZoneSet::addSet(), faceZoneSet::addSet(), cellZoneSet::deleteSet(), pointZoneSet::deleteSet(), faceZoneSet::deleteSet(), main(), cellZoneSet::subset(), pointZoneSet::subset(), faceZoneSet::subset(), and faceSet::sync().
|
inline |
|
inline |
Combine entries from HashSets.
Definition at line 127 of file HashSet.C.
Referenced by HashSet< label, Hash< label > >::operator+=().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.