An STL-conforming hash table. More...
Inherits HashTableCore.
Inherited by EdgeMap< label >, EdgeMap< scalar >, HashPtrTable< curve >, HashPtrTable< dragModel, interfacePair, interfacePair::symmHash >, HashPtrTable< Foam::Field >, HashPtrTable< Foam::GeometricField, Foam::phasePairKey, Foam::phasePairKey::hash >, HashPtrTable< Foam::OFstream >, HashPtrTable< Foam::sutherlandTransport >, HashPtrTable< IOobject >, HashPtrTable< ReactionThermo >, HashPtrTable< T, label, Hash< label > >, HashPtrTable< ThermoType >, HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash >, Map< dictionary >, Map< Foam::edge >, Map< Foam::List >, Map< Foam::Pair< Foam::edge > >, Map< Foam::splitCell * >, Map< Foam::Vector >, and Map< label >.
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 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 | set (const Key &, const T &newElmt) |
Assign a new hashedEntry, overwriting existing entries. 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... | |
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 | 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) |
![]() | |
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 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 const label | maxTableSize |
Maximum allowable table size. More... | |
An STL-conforming hash table.
Definition at line 61 of file HashTable.H.
typedef T value_type |
Type of values the HashTable contains.
Definition at line 321 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 325 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 330 of file HashTable.H.
The type that can represent the size of a HashTable.
Definition at line 333 of file HashTable.H.
Construct given initial table size.
Definition at line 35 of file HashTable.C.
Referenced by HashTable< T, Key, Hash >::HashTable().
Construct from Istream.
Definition at line 33 of file HashTableIO.C.
References HashTable< T, Key, Hash >::operator>>.
Construct as copy.
Definition at line 55 of file HashTable.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), HashTable< T, Key, Hash >::HashTable(), and HashTable< T, Key, Hash >::insert().
Construct by transferring the parameter contents.
Definition at line 80 of file HashTable.C.
References HashTable< T, Key, Hash >::transfer().
~HashTable | ( | ) |
Destructor.
Definition at line 96 of file HashTable.C.
References HashTable< T, Key, Hash >::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(), cellTable::addCellZones(), snappyLayerDriver::addLayers(), polyTopoChange::addMesh(), cellToFaceStencil::calcFaceStencil(), pointMVCWeight::calcWeights(), primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), primitiveMesh::checkEdgeLength(), motionSmootherAlgo::checkMesh(), edgeCollapser::checkMeshQuality(), coalCloudList::coalCloudList(), hexRef8::consistentSlowRefinement2(), cyclicPolyPatch::coupledEdges(), meshRefinement::dupNonManifoldPoints(), surfaceSets::getHangingCells(), combineFaces::getMergeSets(), removePoints::getUnrefimentSet(), meshToMesh::interpolationMethodAMI(), topoSet::invert(), IOobjectList::lookup(), IOobjectList::lookupClass(), meshToMesh::mapAndOpTgtToSrc(), fvMeshDistribute::mapExposedFaces(), polyBoundaryMesh::matchGroups(), meshRefinement::mergePatchFacesUndo(), NamedEnum< Enum, nEnum >::names(), IOobjectList::names(), polyBoundaryMesh::neighbourEdges(), distribution::normalised(), minEqOpFace::operator()(), minEqOp< labelPair >::operator()(), HashTable< T, Key, Hash >::operator==(), Foam::polyMeshZipUpCells(), fvMeshDistribute::printCoupleInfo(), fvMeshDistribute::printFieldInfo(), HashTable< T, Key, Hash >::printInfo(), distribution::raw(), boundaryMesh::readTriSurface(), pointFieldReconstructor::reconstructFields(), fvFieldReconstructor::reconstructFvSurfaceFields(), fvFieldReconstructor::reconstructFvVolumeFields(), fvFieldReconstructor::reconstructFvVolumeInternalFields(), Foam::reconstructLagrangianFieldFields(), Foam::reconstructLagrangianFields(), structuredRenumber::renumber(), faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace(), fvMeshDistribute::saveInternalFields(), motionSmootherAlgo::scaleMesh(), polyTopoChange::setCapacity(), fvMeshSubset::setCellSubset(), duplicatePoints::setRefinement(), removePoints::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), hexRef8::setUnrefinement(), UnsortedMeshedSurface< Face >::sortedZones(), topoSet::subset(), triSurfaceRegionSearch::treeByRegion(), edgeVertex::updateLabels(), boundaryCutter::updateMesh(), localPointRegion::updateMesh(), meshCutAndRemove::updateMesh(), meshCutter::updateMesh(), graph::y(), and inverseDistanceDiffusivity::~inverseDistanceDiffusivity().
|
inline |
Return true if the hash table is empty.
Definition at line 72 of file HashTableI.H.
References HashTable< T, Key, Hash >::insert().
Referenced by forces::calcForcesMoment(), and globalIndexAndTransform::transformIndicesForPatches().
bool found | ( | const Key & | key | ) | const |
Return true if hashedEntry is found in table.
Definition at line 109 of file HashTable.C.
References HashTable< T, Key, Hash >::find(), and InfoInFunction.
Referenced by fieldAverage::addMeanFieldType(), fieldAverage::addPrime2MeanFieldType(), searchableSurfaceToFaceZone::applyToSet(), faceZoneToFaceZone::applyToSet(), setToPointZone::applyToSet(), setToCellZone::applyToSet(), setToFaceZone::applyToSet(), setAndNormalToFaceZone::applyToSet(), setsToFaceZone::applyToSet(), addPatchCellLayer::calcSidePatch(), layerAdditionRemoval::changeTopology(), edgeCollapser::checkMeshQuality(), edgeMeshFormatsCore::checkSupport(), surfaceFormatsCore::checkSupport(), motionSmootherAlgo::correct(), motionSmootherAlgo::correctBoundaryConditions(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), geomCellLooper::cut(), HashTable< T, Key, Hash >::erase(), cellFeatures::faceMap(), polyMeshFilter::filter(), DictionaryBase< IDLListType, T >::found(), interpolationLookUpTable< Type >::found(), surfaceSets::getHangingCells(), removePoints::getUnrefimentSet(), topoSet::invert(), fvMeshAdder::MapDimFields(), fvMeshDistribute::mapExposedFaces(), fvMeshAdder::MapSurfaceFields(), fvMeshAdder::MapVolFields(), cellDistFuncs::maxPatchSize(), NamedEnum< Enum, nEnum >::names(), UnsortedMeshedSurface< Face >::New(), MeshedSurface< Face >::New(), ListPlusEqOp< T, Size >::operator()(), InflationInjection< CloudType >::parcelsToInject(), STARCD::readBoundary(), STARCD::readCells(), faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace(), fvMeshSubset::setCellSubset(), cellTable::setName(), boundaryCutter::setRefinement(), cellDistFuncs::sumPatchSize(), surfaceIntersection::surfaceIntersection(), topoSetSource::usage(), UnsortedMeshedSurface< Face >::write(), MeshedSurface< Face >::write(), and regionSizeDistribution::write().
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 138 of file HashTable.C.
References InfoInFunction, and HashTable< T, Key, Hash >::iterator.
Referenced by distribution::add(), cellTable::addCellZones(), faceZoneSet::addSet(), enrichedPatch::calcEnrichedFaces(), cellMatcher::calcLocalFaces(), createShellMesh::calcPointRegions(), GAMGAgglomeration::calculateRegionMaster(), primitiveMesh::checkFaceFaces(), objectRegistry::checkOut(), probes::classifyFields(), patchPatchDist::correct(), cyclicPolyPatch::coupledEdges(), cyclicACMIGAMGInterface::cyclicACMIGAMGInterface(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), cyclicGAMGInterface::cyclicGAMGInterface(), faceZoneSet::deleteSet(), HashTable< T, Key, Hash >::erase(), HashTable< T, Key, Hash >::found(), snappySnapDriver::getZoneSurfacePoints(), polyBoundaryMesh::groupPatchIDs(), Foam::stringOps::inplaceExpand(), distribution::insertMissingKeys(), fvMeshSubset::interpolate(), lduPrimitiveMesh::lduPrimitiveMesh(), zone::localID(), IOobjectList::lookup(), DictionaryBase< IDLListType, T >::lookup(), DictionaryBase< IDLListType, T >::lookupPtr(), PatchTools::matchEdges(), PatchTools::matchPoints(), polyMeshAdder::mergePoints(), globalMeshData::mergePoints(), polyTopoChange::modifyFace(), attachDetach::modifyMotionPoints(), slidingInterface::modifyMotionPoints(), polyTopoChange::modifyPoint(), cellTable::name(), NamedEnum< Enum, nEnum >::names(), polyBoundaryMesh::neighbourEdges(), GAMGAgglomeration::New(), minEqOpFace::operator()(), minEqOp< labelPair >::operator()(), HashTable< T, Key, Hash >::operator==(), Foam::parseNASCoord(), PatchTools::pointNormals(), fvMeshDistribute::printCoupleInfo(), processorGAMGInterface::processorGAMGInterface(), OBJsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), wallBoundedStreamLine::read(), STARCD::readBoundary(), regionCoupledBaseGAMGInterface::regionCoupledBaseGAMGInterface(), DictionaryBase< IDLListType, T >::remove(), cellTable::setName(), duplicatePoints::setRefinement(), tetDecomposer::setRefinement(), edgeCollapser::setRefinement(), combineFaces::setUnrefinement(), UnsortedMeshedSurface< Face >::sortedZones(), faceZoneSet::subset(), surfaceFeatures::surfaceFeatures(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), syncTools::syncPointList(), hexRef8::updateMesh(), vtkUnstructuredReader::vtkUnstructuredReader(), meshReader::warnDuplicates(), PrimitivePatch< Face, FaceList, PointField, PointType >::whichPoint(), ZoneMesh< ZoneType, MeshType >::whichZone(), meshRefinement::zonify(), and TRIsurfaceFormatCore::~TRIsurfaceFormatCore().
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 169 of file HashTable.C.
References HashTable< T, Key, Hash >::const_iterator, and InfoInFunction.
Foam::List< Key > toc | ( | ) | const |
Return the table of contents.
Definition at line 198 of file HashTable.C.
References HashTable< T, Key, Hash >::cbegin(), and HashTableCore::cend().
Referenced by cellToCellStencil::calcFaceCells(), cellToFaceStencil::calcFaceCells(), surfaceFormatsCore::checkSupport(), triSurfaceTools::collapseEdges(), patchDataWave< TransferType >::correct(), meshRefinement::createBaffles(), dynamicIndexedOctree< Type >::findBox(), indexedOctree< Type >::findBox(), dynamicIndexedOctree< Type >::findSphere(), indexedOctree< Type >::findSphere(), triSurfaceTools::getVertexVertices(), InflationInjection< CloudType >::InflationInjection(), distribution::insertMissingKeys(), Foam::MapConsistentSubMesh(), distribution::mean(), attachDetach::modifyMotionPoints(), objectRegistry::names(), distribution::normalised(), ParticleErosion< CloudType >::ParticleErosion(), PatchPostProcessing< CloudType >::PatchPostProcessing(), Foam::polyMeshZipUpCells(), distribution::raw(), cellSetOption::setCellSet(), fvMeshSubset::setCellSubset(), HashTable< T, Key, Hash >::sortedToc(), and uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs().
Foam::List< Key > sortedToc | ( | ) | const |
Return the table of contents as a sorted list.
Definition at line 213 of file HashTable.C.
References InfoInFunction, HashTableCore::maxTableSize, HashTable< T, Key, Hash >::resize(), Foam::sort(), Foam::T(), and HashTable< T, Key, Hash >::toc().
Referenced by preservePatchesConstraint::add(), singleProcessorFaceSetsConstraint::add(), preservePatchesConstraint::apply(), regIOobject::checkIn(), edgeMeshFormatsCore::checkSupport(), DispersionRASModel< CloudType >::epsilonModel(), coupleGroupIdentifier::findOtherPatchID(), DispersionRASModel< CloudType >::kModel(), sampledPatch::patchIDs(), objectRegistry::sortedNames(), and DictionaryBase< IDLListType, T >::sortedToc().
Foam::Ostream & printInfo | ( | Ostream & | os | ) | const |
Print information.
Definition at line 58 of file HashTableIO.C.
References token::BEGIN_LIST, token::END_LIST, Foam::endl(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, token::info(), token::isLabel(), token::isPunctuation(), token::labelToken(), Foam::nl, token::pToken(), s(), HashTable< T, Key, Hash >::size(), token::SPACE, and Foam::T().
|
inline |
Insert a new hashedEntry.
Definition at line 80 of file HashTableI.H.
Referenced by IOobjectList::add(), distribution::add(), polyTopoChange::addCell(), polyTopoChange::addFace(), polyTopoChange::addPoint(), topoSetSource::addToUsageTable::addToUsageTable(), boundaryRegion::append(), cellTable::append(), DictionaryBase< IDLListType, T >::append(), addPatchCellLayer::calcSidePatch(), primitiveMesh::checkFaceFaces(), objectRegistry::checkIn(), patchPatchDist::correct(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), cyclicPolyPatch::coupledEdges(), globalMeshData::coupledPatchMeshEdgeMap(), HashTable< T, Key, Hash >::empty(), polyMeshAdder::findSharedPoints(), polyBoundaryMesh::groupPatchIDs(), HashTable< T, Key, Hash >::HashTable(), HashSet< label, Hash< label > >::insert(), DictionaryBase< IDLListType, T >::insert(), distribution::insertMissingKeys(), IOobjectList::IOobjectList(), IOobjectList::lookup(), objectRegistry::lookupClass(), IOobjectList::lookupClass(), Foam::MapConsistentSubMesh(), polyTopoChange::modifyFace(), polyTopoChange::modifyPoint(), polyBoundaryMesh::neighbourEdges(), minEqOpFace::operator()(), ListPlusEqOp< T, Size >::operator()(), minEqOp< labelPair >::operator()(), ifEqEqOp< value >::operator()(), cellTable::operator=(), HashTable< T, Key, Hash >::operator=(), Foam::parseNASCoord(), pointMVCWeight::pointMVCWeight(), OBJsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), functionObjectList::read(), wallBoundedStreamLine::read(), STARCD::readBoundary(), boundaryMesh::readTriSurface(), HashTable< T, Key, Hash >::resize(), PtrListDictionary< T >::set(), fvMeshSubset::setCellSubset(), boundaryCutter::setRefinement(), removePoints::setRefinement(), combineFaces::setRefinement(), tetDecomposer::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), combineFaces::setUnrefinement(), UnsortedMeshedSurface< Face >::sortedZones(), hexRef8::storeData(), meshReader::warnDuplicates(), meshRefinement::zonify(), and TRIsurfaceFormatCore::~TRIsurfaceFormatCore().
|
inline |
Assign a new hashedEntry, overwriting existing entries.
Definition at line 91 of file HashTableI.H.
bool erase | ( | const iterator & | iter | ) |
Erase a hashedEntry specified by given iterator.
This invalidates the iterator until the next operator++
Definition at line 367 of file HashTable.C.
Referenced by objectRegistry::checkOut(), cellTable::combine(), cyclicPolyPatch::coupledEdges(), HashTable< T, Key, Hash >::erase(), polyBoundaryMesh::matchGroups(), polyTopoChange::modifyFace(), polyTopoChange::modifyPoint(), polyBoundaryMesh::neighbourEdges(), probes::prepare(), HashPtrTable< T, Key, Hash >::remove(), DictionaryBase< IDLListType, T >::remove(), polyTopoChange::removeCell(), polyTopoChange::removeFace(), polyTopoChange::removePoint(), HashSet< label, Hash< label > >::unset(), vtkUnstructuredReader::vtkUnstructuredReader(), and regionSizeDistribution::write().
bool erase | ( | const Key & | key | ) |
Erase a hashedEntry specified by the given key.
Definition at line 379 of file HashTable.C.
References HashTable< T, Key, Hash >::erase(), and HashTable< T, Key, Hash >::find().
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 386 of file HashTable.C.
References HashTable< T, Key, Hash >::erase(), and UList< T >::size().
void resize | ( | const label | newSize | ) |
Resize the hash table for efficiency.
Definition at line 428 of file HashTable.C.
References HashTableCore::canonicalSize(), HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), InfoInFunction, and HashTable< T, Key, Hash >::insert().
Referenced by polyTopoChange::addMesh(), HashTable< T, Key, Hash >::clearStorage(), fvMeshDistribute::distribute(), HashTable< T, Key, Hash >::operator=(), polyTopoChange::setCapacity(), removePoints::setRefinement(), boundaryCutter::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), HashTable< T, Key, Hash >::shrink(), HashTable< T, Key, Hash >::sortedToc(), and hexRef8::storeData().
void clear | ( | ) |
Clear all entries from table.
Definition at line 464 of file HashTable.C.
Referenced by decompositionMethod::calcCellCells(), cellToFaceStencil::calcFaceCells(), cellToCellStencil::calcFaceCells(), cellToFaceStencil::calcFaceStencil(), primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), primitiveMesh::checkFaceFaces(), edgeCollapser::checkMeshQuality(), HashPtrTable< T, Key, Hash >::clear(), DictionaryBase< IDLListType, T >::clear(), functionObjectList::clear(), HashTable< T, Key, Hash >::clearStorage(), primitiveMesh::faceEdges(), minEqOpFace::operator()(), minEqOp< labelPair >::operator()(), DictionaryBase< IDLListType, T >::operator=(), cellTable::operator=(), HashTable< T, Key, Hash >::operator=(), functionObjectList::read(), wallBoundedStreamLine::read(), boundaryRegion::readDict(), cellTable::readDict(), boundaryCutter::setRefinement(), tetDecomposer::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), hexRef8::setRefinement(), snappyRefineDriver::snappyRefineDriver(), HashTable< T, Key, Hash >::transfer(), and HashTable< T, Key, Hash >::~HashTable().
void clearStorage | ( | ) |
Clear the table entries and the table itself.
Equivalent to clear() followed by resize(0)
Definition at line 488 of file HashTable.C.
References HashTable< T, Key, Hash >::clear(), and HashTable< T, Key, Hash >::resize().
Referenced by polyTopoChange::changeMesh(), polyTopoChange::clear(), and polyTopoChange::makeMesh().
void shrink | ( | ) |
Shrink the allocated table to approx. twice number of elements.
Definition at line 496 of file HashTable.C.
References HashTableCore::canonicalSize(), and HashTable< T, Key, Hash >::resize().
Transfer the contents of the argument table into this table.
and annul the argument table.
Definition at line 509 of file HashTable.C.
References HashTable< T, Key, Hash >::clear().
Referenced by primitiveMesh::checkEdgeLength(), HashTable< T, Key, Hash >::HashTable(), polyBoundaryMesh::matchGroups(), functionObjectList::read(), DictionaryBase< IDLListType, T >::transfer(), boundaryCutter::updateMesh(), localPointRegion::updateMesh(), meshCutAndRemove::updateMesh(), and meshCutter::updateMesh().
|
inline |
Transfer contents to the Xfer container.
Definition at line 102 of file HashTableI.H.
References Foam::xferMove().
Referenced by fvMeshDistribute::distribute().
Find and return a hashedEntry.
Definition at line 111 of file HashTableI.H.
References HashTableCore::end(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Referenced by boundaryRegion::boundaryType(), cellTable::combine(), and boundaryRegion::rename().
Find and return a hashedEntry.
Definition at line 128 of file HashTableI.H.
References HashTableCore::cend(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Find and return a hashedEntry, create it null if not present.
Definition at line 145 of file HashTableI.H.
References HashTableCore::end(), insert(), and Foam::T().
Assignment.
Definition at line 533 of file HashTable.C.
References Foam::abort(), HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), HashTable< T, Key, Hash >::clear(), Foam::FatalError, FatalErrorInFunction, HashTable< T, Key, Hash >::insert(), and HashTable< T, Key, Hash >::resize().
Equality. Hash tables are equal if the keys and values are equal.
Independent of table storage size and table order.
Definition at line 564 of file HashTable.C.
References HashTable< T, Key, Hash >::cbegin(), HashTableCore::cend(), HashTable< T, Key, Hash >::find(), and HashTable< T, Key, Hash >::size().
Referenced by HashTable< T, Key, Hash >::operator!=().
The opposite of the equality operation. Takes linear time.
Definition at line 590 of file HashTable.C.
References HashTable< T, Key, Hash >::operator==().
|
inline |
Iterator set to the beginning of the HashTable.
Definition at line 419 of file HashTableI.H.
References HashTable< T, Key, Hash >::iterator::iterator().
Referenced by distribution::add(), HashTable< T, Key, Hash >::erase(), distribution::insertMissingKeys(), Foam::kShellIntegration(), basicThermo::lookupThermo(), fvMeshAdder::MapDimFields(), Foam::MapGeometricFields(), fvMeshAdder::MapSurfaceFields(), fvMeshAdder::MapVolFields(), polyBoundaryMesh::matchGroups(), boundaryCutter::updateMesh(), regionSizeDistribution::write(), and graph::y().
|
inline |
const_iterator set to the beginning of the HashTable
Definition at line 514 of file HashTableI.H.
References HashTable< T, Key, Hash >::const_iterator::const_iterator().
Referenced by HashTable< T, Key, Hash >::begin(), HashSet< Key, Hash >::HashSet(), HashTable< T, Key, Hash >::HashTable(), HashTable< T, Key, Hash >::operator=(), HashTable< T, Key, Hash >::operator==(), HashTable< T, Key, Hash >::resize(), and HashTable< T, Key, Hash >::toc().
|
inline |
const_iterator set to the beginning of the HashTable
Definition at line 522 of file HashTableI.H.
References HashTable< T, Key, Hash >::cbegin().
Foam::label erase | ( | const HashTable< AnyType, Key, AnyHash > & | rhs | ) |
Definition at line 407 of file HashTable.C.
References HashTable< T, Key, Hash >::begin(), HashTableCore::end(), HashTable< T, Key, Hash >::erase(), and HashTable< T, Key, Hash >::found().
|
friend |
Declare friendship with the HashPtrTable class.
Definition at line 179 of file HashTable.H.
|
friend |
Declare friendship with the iteratorBase.
Definition at line 186 of file HashTable.H.
|
friend |
Declare friendship with the iterator.
Definition at line 189 of file HashTable.H.
Referenced by HashTable< T, Key, Hash >::find().
|
friend |
Declare friendship with the const_iterator.
Definition at line 192 of file HashTable.H.
Referenced by HashTable< T, Key, Hash >::find().
Referenced by HashTable< T, Key, Hash >::HashTable().