An STL-conforming hash table. More...
Classes | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
class | iterator |
An STL-conforming iterator. More... | |
class | iteratorBase |
The iterator base for HashTable. More... | |
Public Types | |
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 const T & | 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 | |
HashTable (const label size=128) | |
Construct given initial table size. More... | |
HashTable (Istream &, const label size=128) | |
Construct from Istream. More... | |
HashTable (const UList< Key > &keyList, const UList< T > &elmtList) | |
Construct from a list of keys and list of elements. More... | |
HashTable (const HashTable< T, Key, Hash > &) | |
Copy constructor. More... | |
HashTable (HashTable< T, Key, Hash > &&) | |
Move constructor. More... | |
HashTable (std::initializer_list< Tuple2< Key, T >>) | |
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 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... | |
List< const_iterator > | sorted () const |
Return a sorted list of constant iterators. More... | |
Ostream & | printInfo (Ostream &) const |
Print information. More... | |
bool | insert (const Key &, const T &newElmt) |
Insert a new hashedEntry. More... | |
void | insert (const HashTable< T, Key, Hash > &) |
Insert all the entries from the given HashTable. More... | |
bool | set (const Key &, const T &newElmt) |
Set a new hashedEntry, overwriting existing entries. More... | |
void | set (const HashTable< T, Key, 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 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... | |
template<class AnyType , class AnyHash > | |
label | erase (const HashTable< AnyType, Key, AnyHash > &) |
Remove entries given by the given keys from this HashTable. More... | |
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... | |
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 operator. More... | |
void | operator= (HashTable< T, Key, Hash > &&) |
Move assignment operator. More... | |
void | operator= (std::initializer_list< Tuple2< Key, T >>) |
Assignment to an initialiser list. 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 | cbegin () const |
const_iterator set to the beginning of the HashTable More... | |
const_iterator | begin () const |
const_iterator set to the beginning of the HashTable More... | |
template<class AnyType , class AnyHash > | |
Foam::label | erase (const HashTable< AnyType, Key, AnyHash > &rhs) |
Public Member Functions inherited from HashTableCore | |
HashTableCore () | |
Construct null. More... | |
ClassName ("HashTable") | |
Define template name and debug. More... | |
Friends | |
template<class T2 , class Key2 , class Hash2 > | |
class | HashPtrTable |
Declare friendship with the HashPtrTable class. More... | |
class | iteratorBase |
Declare friendship with the iteratorBase. More... | |
class | iterator |
Declare friendship with the iterator. More... | |
class | const_iterator |
Declare friendship with the const_iterator. More... | |
Istream & | operator>> (Istream &, HashTable< T, Key, Hash > &) |
Ostream & | operator (Ostream &, const HashTable< T, Key, Hash > &) |
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... | |
An STL-conforming hash table.
Note: Hashing index collisions are handled via chaining using a singly-linked list with the colliding entry being added to the head of the linked list. Thus copying the hash table (or indeed even resizing it) will often result in a different hash order. Use a sorted table-of-contents when the hash order is important.
Definition at line 124 of file HashTable.H.
typedef T value_type |
Type of values the HashTable contains.
Definition at line 346 of file HashTable.H.
Type that can be used for storing into HashTable::value_type.
objects. This type is usually List::value_type&.
Definition at line 350 of file HashTable.H.
typedef const T& const_reference |
Type that can be used for storing into constant.
HashTable::value_type objects. This type is usually const HashTable::value_type&.
Definition at line 355 of file HashTable.H.
The type that can represent the size of a HashTable.
Definition at line 358 of file HashTable.H.
Construct given initial table size.
Definition at line 36 of file HashTable.C.
Construct from Istream.
Definition at line 33 of file HashTableIO.C.
References HashTable< T, Key, Hash >::operator>>.
Construct from a list of keys and list of elements.
Lists must have equal length
Definition at line 83 of file HashTable.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable< T, Key, Hash >::insert(), Foam::nl, and UList< T >::size().
Copy constructor.
Definition at line 56 of file HashTable.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), and HashTable< T, Key, Hash >::insert().
Move constructor.
Definition at line 68 of file HashTable.C.
References HashTable< T, Key, Hash >::transfer().
Construct from an initialiser list.
Definition at line 108 of file HashTable.C.
References HashTable< T, Key, Hash >::insert().
Destructor.
Definition at line 125 of file HashTable.C.
References clear().
|
inline |
The size of the underlying table.
Definition at line 58 of file HashTableI.H.
|
inline |
Return number of elements in table.
Definition at line 65 of file HashTableI.H.
Referenced by singleProcessorFaceSetsConstraint::add(), snappyLayerDriver::addLayers(), normalToFace::applyToSet(), cellToFaceStencil::calcFaceStencil(), createShellMesh::calcPointRegions(), GAMGAgglomeration::calculateRegionMaster(), pointMVCWeight::calcWeights(), Foam::meshCheck::checkEdgeAlignment(), Foam::meshCheck::checkEdgeLength(), Foam::meshCheck::checkGeometry(), Foam::meshCheck::checkMesh(), edgeCollapser::checkMeshQuality(), Foam::meshCheck::checkTopology(), cellTable::combine(), hexRef8::consistentSlowRefinement(), hexRef8::consistentSlowRefinement2(), cyclicPolyPatch::coupledEdges(), meshRefinement::createZoneBaffles(), snappyLayerDriver::doLayers(), snappySnapDriver::doSnap(), meshRefinement::dupNonManifoldPoints(), surfaceSets::getHangingCells(), combineFaces::getMergeSets(), removePoints::getUnrefimentSet(), Foam::interpolatePointToCell(), layerParameters::layerParameters(), lduPrimitiveMesh::lduPrimitiveMesh(), polyBoundaryMesh::matchGroups(), cellToCellStencil::merge(), cellToFaceStencil::merge(), Foam::meshCheck::mergeAndWrite(), edgeMesh::mergeEdges(), meshRefinement::mergeEdgesUndo(), meshRefinement::mergePatchFacesUndo(), meshToMesh::meshToMesh(), polyBoundaryMesh::nbrEdges(), inversePointDistanceDiffusivity::operator()(), Foam::polyMeshZipUpCells(), rigidBodyPoints::read(), repatchMesh::readTriSurface(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), structuredRenumber::renumber(), faceZone::reset(), motionSmootherAlgo::scaleMesh(), fvMeshSubset::setCellSubset(), removePoints::setRefinement(), hexRef8::setRefinement(), edgeCollapser::setRefinement(), duplicatePoints::setRefinement(), hexRef8::setUnrefinement(), UnsortedMeshedSurface< Face >::sortedZones(), surfaceFeatures::surfaceFeatures(), faceZoneSet::sync(), pointSet::sync(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), triSurfaceRegionSearch::treeByRegion(), loadBalancer::update(), edgeVertex::updateLabels(), regionSizeDistribution::write(), domainDecomposition::writeComplete(), and domainDecomposition::writeProcs().
|
inline |
Return true if the hash table is empty.
Definition at line 72 of file HashTableI.H.
Referenced by forcesBase::calcForcesMoments(), phaseSystem::solve(), globalIndexAndTransform::transformIndicesForPatches(), and TriPatchIntersection< SrcPatchType, TgtPatchType >::TriPatchIntersection().
bool found | ( | const Key & | key | ) | const |
Return true if hashedEntry is found in table.
Definition at line 138 of file HashTable.C.
References InfoInFunction.
Referenced by Foam::addField(), cellZoneSet::addSet(), pointZoneSet::addSet(), twoPhaseSolver::alphaPhi(), setToCellZone::applyToSet(), faceZoneToFaceZone::applyToSet(), setAndNormalToFaceZone::applyToSet(), setsToFaceZone::applyToSet(), setToFaceZone::applyToSet(), setToPointZone::applyToSet(), addPatchCellLayer::calcSidePatch(), edgeMeshFormatsCore::checkSupport(), surfaceFormatsCore::checkSupport(), meshRefinement::collectFaces(), motionSmootherAlgo::correctBoundaryConditions(), nearWallFields::createFields(), dynamicMeshPointInterpolator::curPointField(), curvatureSeparation::curvatureSeparation(), geomCellLooper::cut(), hexCellLooper::cut(), Foam::meshTools::cutDirToEdge(), cellZoneSet::deleteSet(), pointZoneSet::deleteSet(), HashTable< T, Key, Hash >::erase(), BlendedInterfacialModel< ModelType >::evaluate(), polyMeshFilter::filter(), surfaceSets::getHangingCells(), removePoints::getUnrefimentSet(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::InterfaceCompositionPhaseChangePhaseSystem(), cellZoneSet::invert(), faceZoneSet::invert(), pointZoneSet::invert(), fvMeshAdder::MapDimFields(), fvMeshAdder::MapPointFields(), fvMeshAdder::MapSurfaceFields(), fvMeshAdder::MapVolFields(), meshRefinement::mergePatchFacesUndo(), MeshedSurface< Face >::New(), UnsortedMeshedSurface< Face >::New(), sampledSet::New(), HashSet< Key, Hash >::operator&=(), inversePointDistanceDiffusivity::operator()(), HashSet< Key, Hash >::operator==(), turbulenceFields::processField(), STARCD::readBoundary(), Foam::readFields(), fieldAverage::readMeanFieldType(), Foam::readUniformFields(), fvMeshSubset::setCellSubset(), motionSmootherAlgo::setDisplacementPatchFields(), refinementIterator::setRefinement(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::specieTransfer(), cellZoneSet::subset(), pointZoneSet::subset(), surfaceIntersection::surfaceIntersection(), faceSet::sync(), faceZone::topoChange(), TriPatchIntersection< SrcPatchType, TgtPatchType >::TriPatchIntersection(), wideBand::wideBand(), regionSizeDistribution::write(), MeshedSurface< Face >::write(), UnsortedMeshedSurface< Face >::write(), domainDecomposition::writeComplete(), and domainDecomposition::writeProcs().
Foam::HashTable< T, Key, Hash >::iterator find | ( | const Key & | key | ) |
Find and return an iterator set at the hashedEntry.
If not found iterator = end()
Definition at line 166 of file HashTable.C.
References InfoInFunction.
Referenced by cellTable::addCellZones(), faceZoneSet::addSet(), cellMatcher::calcLocalFaces(), createShellMesh::calcPointRegions(), GAMGAgglomeration::calculateRegionMaster(), Foam::meshCheck::checkFaceFaces(), objectRegistry::checkIn(), objectRegistry::checkOut(), patchPatchDist::correct(), cyclicPolyPatch::coupledEdges(), meshRefinement::createZoneBaffles(), cutPolyIsoSurface::cutPolyIsoSurface(), cyclicGAMGInterface::cyclicGAMGInterface(), faceZoneSet::deleteSet(), combineFaces::getMergeSets(), snappySnapDriver::getZoneSurfacePoints(), polyBoundaryMesh::groupPatchIndices(), Foam::stringOps::inplaceExpandCodeTemplate(), fvMeshSubset::interpolate(), lduPrimitiveMesh::lduPrimitiveMesh(), DictionaryBase< IDLListType, T >::lookup(), DictionaryBase< IDLListType, T >::lookupPtr(), PatchTools::matchEdges(), PatchTools::matchPoints(), globalMeshData::mergePoints(), polyBoundaryMesh::nbrEdges(), PatchTools::pointNormals(), processorGAMGInterface::processorGAMGInterface(), NASsurfaceFormat< Face >::read(), OBJsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), STARCD::readBoundary(), Foam::readUniformFields(), regionSizeDistribution::regionSum(), DictionaryBase< IDLListType, T >::remove(), undoableMeshCutter::removeSplitFaces(), undoableMeshCutter::setRefinement(), edgeCollapser::setRefinement(), duplicatePoints::setRefinement(), combineFaces::setUnrefinement(), phaseSystem::solve(), UnsortedMeshedSurface< Face >::sortedZones(), faceZoneSet::subset(), surfaceFeatures::surfaceFeatures(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), syncTools::syncPointList(), syncTools::syncPointMap(), hexRef8::topoChange(), meshReader::warnDuplicates(), PrimitivePatch<::Foam::List< Face >, pointField >::whichPoint(), and meshRefinement::zonify().
Foam::HashTable< T, Key, Hash >::const_iterator find | ( | const Key & | key | ) | const |
Find and return an const_iterator set at the hashedEntry.
If not found iterator = end()
Definition at line 197 of file HashTable.C.
Foam::List< Key > toc |
Return the table of contents.
Definition at line 227 of file HashTable.C.
Referenced by cellToCellStencil::calcFaceCells(), cellToFaceStencil::calcFaceCells(), cellTable::combine(), meshRefinement::createBaffles(), dynamicIndexedOctree< Type >::findBox(), indexedOctree< Type >::findBox(), dynamicIndexedOctree< Type >::findSphere(), indexedOctree< Type >::findSphere(), Foam::meshCheck::getAffectedCells(), removePoints::getUnrefimentSet(), triSurfaceTools::getVertexVertices(), cellToCellStencil::unionEqOp::operator()(), cellToFaceStencil::unionEqOp::operator()(), ParticleErosion< CloudType >::ParticleErosion(), PatchPostProcessing< CloudType >::PatchPostProcessing(), Foam::polyMeshZipUpCells(), writeDictionary::read(), Foam::readDir(), distributionMapBase::schedule(), fvMeshSubset::setCellSubset(), hexRef8::setUnrefinement(), and Foam::meshTools::writeOBJ().
Foam::List< Key > sortedToc |
Return the table of contents as a sorted list.
Definition at line 242 of file HashTable.C.
Referenced by preservePatchesConstraint::add(), singleProcessorFaceSetsConstraint::add(), Foam::AddPatchFields(), preservePatchesConstraint::apply(), edgeMeshFormatsCore::checkSupport(), surfaceFormatsCore::checkSupport(), coupleGroupIdentifier::findOtherPatchID(), Zone< ZoneType, ZonesType >::insert(), Foam::listAllConfigFiles(), Foam::listSwitches(), Foam::meshCheck::mergeAndWrite(), Foam::meshCheck::printMeshStats(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), Foam::ReorderPatchFields(), cellZoneSet::sync(), pointZoneSet::sync(), and regionSizeDistribution::write().
Foam::List< typename Foam::HashTable< T, Key, Hash >::const_iterator > sorted |
Return a sorted list of constant iterators.
Definition at line 253 of file HashTable.C.
Referenced by faceZone::reset().
Foam::Ostream & printInfo | ( | Ostream & | os | ) | const |
Print information.
Definition at line 58 of file HashTableIO.C.
References Foam::count(), and Foam::endl().
|
inline |
Insert a new hashedEntry.
Definition at line 79 of file HashTableI.H.
Referenced by faceZoneSet::addSet(), Foam::addToRunTimeSelectionTableToC(), Residuals< Type >::append(), boundaryRegion::boundaryTypes(), Zone< ZoneType, ZonesType >::calcLookupMap(), createShellMesh::calcPointRegions(), addPatchCellLayer::calcSidePatch(), GAMGAgglomeration::calculateRegionMaster(), Foam::meshCheck::checkEdgeAlignment(), Foam::meshCheck::checkFaceFaces(), objectRegistry::checkIn(), Foam::meshCheck::checkWedges(), cellTable::combine(), hexRef8::consistentSlowRefinement(), patchPatchDist::correct(), cyclicPolyPatch::coupledEdges(), globalMeshData::coupledPatchMeshEdgeMap(), cutPolyIsoSurface::cutPolyIsoSurface(), cyclicGAMGInterface::cyclicGAMGInterface(), faceZoneSet::deleteSet(), BlendedInterfacialModel< ModelType >::evaluate(), phaseSystem::generateInterfacialValues(), undoableMeshCutter::getAddedCells(), combineFaces::getMergeSets(), greyMean::greyMean(), polyBoundaryMesh::groupPatchIndices(), HashTable< T, Key, Hash >::HashTable(), OneResistanceHeatTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), ThermalPhaseChangePhaseSystem< BasePhaseSystem >::heatTransfer(), TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), HashSet< Key, Hash >::insert(), faceZone::insert(), populationBalanceModel::groups::insert(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::InterfaceCompositionPhaseChangePhaseSystem(), fvMeshSubset::interpolate(), IOobjectList::IOobjectList(), lduPrimitiveMesh::lduPrimitiveMesh(), IOobjectList::lookup(), objectRegistry::lookupClass(), IOobjectList::lookupClass(), PatchTools::matchEdges(), cellTable::materialTypes(), edgeMesh::mergeEdges(), MomentumTransferPhaseSystem< BasePhaseSystem >::momentumTransfer(), MomentumTransferPhaseSystem< BasePhaseSystem >::momentumTransferf(), boundaryRegion::names(), cellTable::names(), polyBoundaryMesh::nbrEdges(), surfaceFeatures::nearestEdges(), surfaceFeatures::nearestSamples(), cellTable::operator=(), PhaseTransferPhaseSystem< BasePhaseSystem >::PhaseTransferPhaseSystem(), pointMVCWeight::pointMVCWeight(), processorGAMGInterface::processorGAMGInterface(), Foam::patchToPatchTools::rDistributeTgtAddressing(), NASedgeFormat::read(), STARCDedgeFormat::read(), NASsurfaceFormat< Face >::read(), OBJsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), STARCD::readBoundary(), STARCDsurfaceFormatCore::readInpCellTable(), repatchMesh::readTriSurface(), regionSizeDistribution::regionSum(), boundaryRegion::rename(), HashTable< T, Key, Hash >::resize(), cellTable::selectType(), fvMeshSubset::setCellSubset(), removePoints::setRefinement(), combineFaces::setRefinement(), edgeCollapser::setRefinement(), refinementIterator::setRefinement(), combineFaces::setUnrefinement(), UnsortedMeshedSurface< Face >::sortedZones(), PhaseTransferPhaseSystem< BasePhaseSystem >::specieTransfer(), ThermalPhaseChangePhaseSystem< BasePhaseSystem >::specieTransfer(), faceZoneSet::subset(), surfaceFeatures::surfaceFeatures(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), ThermalPhaseChangePhaseSystem< BasePhaseSystem >::ThermalPhaseChangePhaseSystem(), localPointRegion::topoChange(), faceZone::topoChange(), meshCutter::topoChange(), GeometricFieldSources< Type, GeoMesh >::types(), edgeVertex::updateLabels(), meshReader::warnDuplicates(), wideBand::wideBand(), domainDecomposition::writeComplete(), Foam::meshTools::writeOBJ(), and meshRefinement::zonify().
Insert all the entries from the given HashTable.
Definition at line 363 of file HashTable.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), and Foam::vtkWriteOps::insert().
|
inline |
Set a new hashedEntry, overwriting existing entries.
Definition at line 90 of file HashTableI.H.
Referenced by Foam::addField(), reactionDriven::dmidtf(), edgeCollapser::markSmallEdges(), domainDecomposition::procFaceAddressingBf(), STARCDedgeFormat::read(), and syncTools::syncPointMap().
Insert all the entries from the given HashTable,.
overwriting existing entries
Definition at line 373 of file HashTable.C.
References HashTable< T, Key, Hash >::cbegin(), and HashTableCore::cend().
bool erase | ( | const iterator & | iter | ) |
Erase a hashedEntry specified by given iterator.
This invalidates the iterator until the next operator++
Definition at line 445 of file HashTable.C.
References erase().
Referenced by topoSetSource::addOrDelete(), fileOperation::addWatches(), masterUncollatedFileOperation::addWatches(), normalToFace::applyToSet(), objectRegistry::checkOut(), cellTable::combine(), cyclicPolyPatch::coupledEdges(), polyBoundaryMesh::groupPatchIndices(), polyBoundaryMesh::matchGroups(), polyBoundaryMesh::nbrEdges(), probes::prepare(), Foam::readUniformFields(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), HashPtrTable< T, Key, Hash >::remove(), perfectInterface::setRefinement(), HashSet< Key, Hash >::unset(), and regionSizeDistribution::write().
bool erase | ( | const Key & | key | ) |
Erase a hashedEntry specified by the given key.
Definition at line 457 of file HashTable.C.
References erase().
Foam::label erase | ( | const UList< Key > & | keys | ) |
Remove entries given by the listed keys from this HashTable.
Return the number of elements removed
Definition at line 464 of file HashTable.C.
References Foam::count(), erase(), and UList< T >::size().
void resize | ( | const label | newSize | ) |
Resize the hash table for efficiency.
Definition at line 506 of file HashTable.C.
References HashTableCore::canonicalSize(), InfoInFunction, and HashTable< T, Key, Hash >::insert().
Referenced by Foam::meshCheck::checkEdgeAlignment(), Foam::meshCheck::checkWedges(), fvMeshDistribute::distribute(), removePoints::setRefinement(), edgeCollapser::setRefinement(), syncTools::syncPointMap(), cellZoneSet::updateSet(), faceZoneSet::updateSet(), and pointZoneSet::updateSet().
void clear |
Clear all entries from table.
Definition at line 542 of file HashTable.C.
Referenced by Residuals< Type >::append(), decompositionMethod::calcCellCells(), cellToCellStencil::calcFaceCells(), cellToFaceStencil::calcFaceCells(), cellToFaceStencil::calcFaceStencil(), Foam::meshCheck::checkFaceFaces(), multiValveEngine::movingObject::createStaticPatchSet(), tetIndices::faceTriIs(), cellTable::operator=(), NASedgeFormat::read(), STARCDedgeFormat::read(), NASsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), and surfaceFeatures::surfaceFeatures().
void clearStorage |
Clear the table entries and the table itself.
Equivalent to clear() followed by resize(0)
Definition at line 566 of file HashTable.C.
References clear(), and resize().
Referenced by cellZoneSet::updateSet(), faceZoneSet::updateSet(), and pointZoneSet::updateSet().
void shrink |
Shrink the allocated table to approx. twice number of elements.
Definition at line 574 of file HashTable.C.
References HashTableCore::canonicalSize(), and resize().
Transfer the contents of the argument table into this table.
and annul the argument table.
Definition at line 587 of file HashTable.C.
References clear().
Referenced by Foam::meshCheck::checkEdgeLength(), HashTable< T, Key, Hash >::HashTable(), polyBoundaryMesh::matchGroups(), NASedgeFormat::read(), STARCDedgeFormat::read(), populationBalanceModel::groups::retrieve(), motionSmootherAlgo::scaleMesh(), and pointSet::sync().
Find and return a hashedEntry.
Definition at line 103 of file HashTableI.H.
References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Find and return a hashedEntry.
Definition at line 120 of file HashTableI.H.
References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Find and return a hashedEntry, create it null if not present.
Definition at line 137 of file HashTableI.H.
References Foam::vtkWriteOps::insert(), and Foam::T().
Assignment operator.
Definition at line 610 of file HashTable.C.
References Foam::abort(), clear(), Foam::FatalError, FatalErrorInFunction, Foam::vtkWriteOps::insert(), and resize().
Referenced by HashPtrTable< T, Key, Hash >::operator=().
Move assignment operator.
Definition at line 641 of file HashTable.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Assignment to an initialiser list.
Definition at line 659 of file HashTable.C.
References clear(), Foam::vtkWriteOps::insert(), and resize().
Equality. Hash tables are equal if the keys and values are equal.
Independent of table storage size and table order.
Definition at line 682 of file HashTable.C.
The opposite of the equality operation. Takes linear time.
Definition at line 708 of file HashTable.C.
References Foam::operator==().
|
inline |
Iterator set to the beginning of the HashTable.
Definition at line 411 of file HashTableI.H.
References HashTable< T, Key, Hash >::iterator.
Referenced by HashPtrTable< T, Key, Hash >::HashPtrTable(), basicThermo::lookupThermo(), polyBoundaryMesh::matchGroups(), multivariateScheme< Type, Scheme >::multivariateScheme(), multivariateSelectionScheme< Type >::multivariateSelectionScheme(), and regionSizeDistribution::write().
|
inline |
const_iterator set to the beginning of the HashTable
Definition at line 506 of file HashTableI.H.
References HashTable< T, Key, Hash >::const_iterator.
Referenced by HashTable< T, Key, Hash >::begin(), HashTable< T, Key, Hash >::HashTable(), HashTable< T, Key, Hash >::insert(), HashSet< Key, Hash >::operator-=(), HashSet< Key, Hash >::operator^=(), HashSet< Key, Hash >::operator|=(), and HashTable< T, Key, Hash >::set().
|
inline |
const_iterator set to the beginning of the HashTable
Definition at line 514 of file HashTableI.H.
References HashTable< T, Key, Hash >::cbegin().
Foam::label erase | ( | const HashTable< AnyType, Key, AnyHash > & | rhs | ) |
Definition at line 484 of file HashTable.C.
References Foam::count(), erase(), and HashTable< T, Key, Hash >::found().
|
friend |
Declare friendship with the HashPtrTable class.
Definition at line 188 of file HashTable.H.
|
friend |
Declare friendship with the iteratorBase.
Definition at line 191 of file HashTable.H.
|
friend |
Declare friendship with the iterator.
Definition at line 194 of file HashTable.H.
Referenced by HashTable< T, Key, Hash >::begin().
|
friend |
Declare friendship with the const_iterator.
Definition at line 197 of file HashTable.H.
Referenced by HashTable< T, Key, Hash >::cbegin().
Referenced by HashTable< T, Key, Hash >::HashTable().