An STL-conforming hash table. More...
Data Structures | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
struct | hashedEntry |
Structure to hold a hashed entry with SLList for collisions. 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 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) |
Data Fields | |
const typedef T & | const_reference |
Type that can be used for storing into constant. More... | |
Private Member Functions | |
label | hashKeyIndex (const Key &) const |
Return the hash index of the Key within the current table size. More... | |
bool | set (const Key &, const T &newElmt, bool protect) |
Assign a new hashedEntry to a possibly already existing key. More... | |
Static Private Member Functions | |
static label | canonicalSize (const label) |
Return a canonical (power-of-two) size. More... | |
Private Attributes | |
label | nElmts_ |
The current number of elements in table. More... | |
label | tableSize_ |
Number of primary entries allocated in table. More... | |
hashedEntry ** | table_ |
The table of primary entries. 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 > &) |
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.
The type that can represent the size of a HashTable.
Definition at line 333 of file HashTable.H.
Construct by transferring the parameter contents.
~HashTable | ( | ) |
Destructor.
Definition at line 96 of file HashTable.C.
|
staticprivate |
Return a canonical (power-of-two) size.
|
inlineprivate |
Return the hash index of the Key within the current table size.
No checks for zero-sized tables.
Definition at line 48 of file HashTableI.H.
|
private |
Assign a new hashedEntry to a possibly already existing key.
Referenced by main().
|
inline |
The size of the underlying table.
Definition at line 58 of file HashTableI.H.
Referenced by main().
|
inline |
Return number of elements in table.
Definition at line 65 of file HashTableI.H.
Referenced by singleProcessorFaceSetsConstraint::add(), polyMeshGenModifier::addBufferCells(), normalToFace::applyToSet(), cellCuts::calcAnchors(), polyDualMesh::calcDual(), FECCellToFaceStencil::calcFaceStencil(), cellToFaceStencil::calcFaceStencil(), globalMeshData::calcSharedEdges(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), triSurfAddressing::calculateFacetFacetsEdges(), globalPoints::calculateSharedPoints(), boundaryMesh::changeFaces(), checkIrregularSurfaceConnections::checkAndFixIrregularConnections(), meshOctreeAddressing::checkAndFixIrregularConnections(), autoLayerDriver::checkAndUnmark(), polyMesh::checkEdgeAlignment(), primitiveMesh::checkEdgeAlignment(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), primitiveMesh::checkEdgeLength(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), edgeExtractor::checkFacePatchesGeometry(), Foam::checkGeometry(), meshOctreeAddressing::checkGluedRegions(), motionSmootherAlgo::checkMesh(), autoLayerDriver::checkMeshManifold(), Foam::checkMeshQuality(), edgeCollapser::checkMeshQuality(), Foam::checkTopology(), coalCloudList::coalCloudList(), faceToCell::combine(), pointToFace::combine(), hexRef8::consistentSlowRefinement2(), meshToMesh::constructFromCuttingPatches(), inversePointDistanceDiffusivity::correct(), cyclicPolyPatch::coupledEdges(), autoRefineDriver::danglingCellRefine(), doCommand(), autoLayerDriver::doLayers(), autoRefineDriver::doRefine(), autoSnapDriver::doSnap(), extractSurface(), combineFaces::faceNeighboursValid(), meshOptimizer::findBadFaces(), Foam::polyMeshGenChecks::findBadFaces(), Foam::polyMeshGenChecks::findBadFacesRelaxed(), findBaffles(), meshRefinement::findEdgeConnectedProblemCells(), meshOptimizer::findLowQualityFaces(), Foam::polyMeshGenChecks::findLowQualityFaces(), findMatches(), faceCoupleInfo::findSlavesCoveringMaster(), Foam::polyMeshGenChecks::findWorstQualityFaces(), surfaceSets::getHangingCells(), combineFaces::getMergeSets(), cellDistFuncs::getPointNeighbours(), removePoints::getUnrefimentSet(), autoLayerDriver::handleNonManifolds(), meshRefinement::handleSnapProblems(), injectionModelList::injectionModelList(), Foam::interpolatePointToCell(), topoSet::invert(), layerParameters::layerParameters(), main(), immersedBoundaryFvPatch::makeTriAddressing(), fvMeshDistribute::mapBoundaryFields(), fvMeshDistribute::mapExposedFaces(), meshRefinement::markFacesOnProblemCells(), meshRefinement::markFacesOnProblemCellsGeometric(), meshRefinement::markFeatureCellLevel(), meshToMesh::maskCells(), polyBoundaryMesh::matchGroups(), cellToCellStencil::merge(), cellToFaceStencil::merge(), Foam::mergeAndWrite(), edgeMesh::mergeEdges(), meshRefinement::mergeEdgesUndo(), meshRefinement::mergePatchFacesUndo(), surfaceMorpherCells::morphBoundaryFaces(), surfaceMorpherCells::morphInternalFaces(), MRFZone::MRFZone(), polyBoundaryMesh::neighbourEdges(), Foam::help::numberOfEdgeGroups(), Foam::help::numberOfFaceGroups(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator==(), symmetryPlaneOptimisation::optimizeSymmetryPlanes(), Foam::polyMeshZipUpCells(), printAllSets(), wallBoundedStreamLine::read(), dynamicRefineFvMesh::refine(), autoRefineDriver::refinementInterfaceRefine(), checkNonMappableCellConnections::removeCells(), structuredRenumber::renumber(), polyTopoChange::renumber(), faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace(), fvMeshDistribute::saveBoundaryFields(), fvMeshDistribute::saveInternalFields(), motionSmootherAlgo::scaleMesh(), MRFZone::setMRFFaces(), removePoints::setRefinement(), hexRef8::setRefinement(), hexRef8::setUnrefinement(), meshRefinement::splitFacesUndo(), topoSet::subset(), surfaceFeatures::surfaceFeatures(), extendedUpwindCellToFaceStencil::transportStencil(), meshOptimizer::untangleBoundaryLayer(), updateCellSet(), domainDecomposition::writeDecomposition(), autoLayerDriver::writeLayerSets(), writeVTK(), inverseDistanceDiffusivity::y(), polyMeshGenModifier::zipUpCells(), and meshRefinement::zonify().
|
inline |
Return true if the hash table is empty.
Definition at line 72 of file HashTableI.H.
Referenced by forces::calcForcesMoment(), patchToFace::combine(), 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.
Referenced by refineImmersedBoundaryMesh::addIbCellCellFaces(), refineImmersedBoundaryMesh::addIbCellCells(), refineImmersedBoundaryMesh::addIbCells(), immersedBoundaryFvPatch::addIbCornerCells(), autoLayerDriver::addLayers(), fieldAverage::addMeanFieldType(), searchableSurfaceToFaceZone::applyToSet(), setToCellZone::applyToSet(), faceZoneToFaceZone::applyToSet(), setToPointZone::applyToSet(), setToFaceZone::applyToSet(), setAndNormalToFaceZone::applyToSet(), setsToFaceZone::applyToSet(), meshToMesh0::calcAddressing(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), meshRefinement::calcNeighbourData(), meshSurfaceEngine::calculateBoundaryNodes(), boundaryLayerOptimisation::calculateHairEdges(), autoLayerDriver::cellsUseFace(), meshOctreeAddressing::checkAndFixIrregularConnections(), Foam::polyMeshGenChecks::checkCellPartTetrahedra(), edgeExtractor::checkCorners(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), decomposeCells::checkFaceConnections(), Foam::polyMeshGenChecks::checkFaceFlatness(), edgeExtractor::checkFacePatchesGeometry(), Foam::polyMeshGenChecks::checkFacePyramids(), meshOctreeAddressing::checkGluedRegions(), edgeMeshFormatsCore::checkSupport(), surfaceFormatsCore::checkSupport(), boundaryLayers::checkTopologyOfBoundaryFaces(), meshSurfaceCheckInvertedVertices::checkVertices(), triSurfaceTools::collapseCreatesFold(), triSurfaceTools::collapseMinCosAngle(), meshRefinement::collectFaces(), pointToCell::combine(), pointToFace::combine(), cellToFace::combine(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), motionSmootherAlgo::correctBoundaryConditions(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), slidingInterface::coupleInterface(), boundaryLayers::createLayerCells(), edgeExtractor::cornerEvaluator::createParallelAddressing(), curvatureSeparation::curvatureSeparation(), hexCellLooper::cut(), geomCellLooper::cut(), Foam::meshTools::cutDirToEdge(), cellZoneSet::deleteSet(), pointZoneSet::deleteSet(), attachDetach::detachInterface(), edgeCollapser::determineDuplicatePointsOnFace(), triSurfaceTools::edgeCosAngle(), meshOctreeModifier::ensureCorrectRegularity(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase(), Foam::help::exchangeMap(), polyMeshFilter::filter(), removeFaces::filterFace(), surfaceMorpherCells::findBoundaryVertices(), immersedBoundaryFvPatch::findCellCells(), meshOctreeCube::findContainedEdges(), findCellsIntersectingSurface::findIntersectedCells(), meshSurfaceOptimizer::findInvertedVertices(), meshOctree::findNearestCorner(), boundaryLayers::findPatchesToBeTreatedTogether(), surfaceSets::getHangingCells(), triSurfaceTools::getMergedEdges(), cellDistFuncs::getPointNeighbours(), removePoints::getUnrefimentSet(), autoLayerDriver::handleNonManifolds(), surfaceInterpolateFields::interpolateFields(), topoSet::invert(), main(), immersedBoundaryFvPatch::makeIbCellCells(), immersedBoundaryFvPatch::makeIbCells(), immersedBoundaryFvPatch::makeIbInsideFaces(), immersedBoundaryFvPatch::makeIbInternalFaces(), immersedBoundaryFvPatch::makeTriAddressing(), meshSurfaceMapper::mapCorners(), meshSurfaceMapper2D::mapCorners(), fvMeshAdder::MapDimFields(), fvMeshDistribute::mapExposedFaces(), fvMeshAdder::MapSurfaceFields(), meshSurfaceMapper::mapVerticesOntoSurfacePatches(), fvMeshAdder::MapVolFields(), meshOctreeModifier::markAdditionalLayers(), meshOctreeModifier::markAdditionalLayersOfFaceNeighbours(), cellDistFuncs::maxPatchSize(), merge(), removeFaces::mergeFaces(), meshRefinement::mergePatchFacesUndo(), polyMeshAdder::mergePrimitives(), chemkinReader::molecularWeight(), meshSurfaceOptimizer::newEdgePositionLaplacian(), Foam::help::numberOfEdgeGroups(), Foam::help::numberOfFaceGroups(), InflationInjection< CloudType >::parcelsToInject(), partTetMesh::partTetMesh(), partTriMesh::partTriMesh(), boundaryMesh::patchify(), slidingInterface::projectPoints(), meshOctreeCreator::refineBoxesNearDataBoxes(), layerAdditionRemoval::removeCellLayer(), reorderMesh(), fieldAverage::resetFields(), faceAreaWeightAMI< SourcePatch, TargetPatch >::restartUncoveredSourceFace(), meshOctreeInsideOutside::reviseDataBoxes(), globalPoints::sendPatchPoints(), fvMeshSubset::setCellSubset(), patchWave::setChangedFaces(), patchDataWave< TransferType >::setChangedFaces(), motionSmootherAlgo::setDisplacementPatchFields(), MRFZone::setMRFFaces(), meshRefinement::splitFacesUndo(), topoSet::subset(), cellDistFuncs::sumPatchSize(), surfaceIntersection::surfaceIntersection(), medialAxisMeshMover::update(), setUpdater::updateSets(), polyMeshFilter::updateSets(), topoSetSource::usage(), triSurfaceTools::vertexUsesFace(), wallLayerCells::wallLayerCells(), domainDecomposition::writeDecomposition(), and writeVTK().
iterator find | ( | const Key & | ) |
Find and return an iterator set at the hashedEntry.
If not found iterator = end()
Referenced by meshCutAndRemove::addEdgeCutsToFace(), meshCutter::addEdgeCutsToFace(), triSurfaceMesh::addFaceToEdge(), meshRefinement::allocateInterRegionFaceZone(), meshToMesh0::calcAddressing(), globalMeshData::calcSharedEdges(), objectRegistry::checkOut(), triSurfacePartitioner::cornersSharedByEdgeGroups(), meshStructure::correct(), patchPatchDist::correct(), globalMeshData::countSharedEdges(), cyclicPolyPatch::coupledEdges(), cyclicGAMGInterface::cyclicGAMGInterface(), triSurfacePartitioner::edgeGroupsSharedByPatches(), extractPatchGroups(), surfaceIntersection::filterLabels(), fvMeshDistribute::findCouples(), polyBoundaryMesh::groupPatchIDs(), Foam::stringOps::inplaceExpand(), polyMeshAdder::insertVertices(), meshCutAndRemove::loopToFace(), meshCutter::loopToFace(), main(), PatchTools::matchEdges(), polyBoundaryMesh::neighbourEdges(), GAMGAgglomeration::New(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator==(), processorGAMGInterface::processorGAMGInterface(), vtkUnstructuredReader::read(), wallBoundedStreamLine::read(), triSurface::readOBJ(), triSurface::readTRI(), functionObjectList::remove(), DictionaryBase< DLPtrList< T >, T >::remove(), probes::sampleAndWrite(), tetDecomposer::setRefinement(), surfaceFeatures::surfaceFeatures(), and meshReader::warnDuplicates().
const_iterator find | ( | const Key & | ) | const |
Find and return an const_iterator set at the hashedEntry.
If not found iterator = end()
Foam::List< Key > toc | ( | ) | const |
Return the table of contents.
Definition at line 201 of file HashTable.C.
Referenced by layerAdditionRemoval::addCellLayer(), immersedBoundaryFvPatch::addIbCornerCells(), primitiveMeshGeometry::affectedCells(), polyMeshGeometry::affectedCells(), attachDetach::attachInterface(), slidingInterface::calcAttachedAddressing(), PrimitivePatch< labelledTri, List, pointField, point >::calcBdryPoints(), cellToCellStencil::calcFaceCells(), cellToFaceStencil::calcFaceCells(), surfaceFormatsCore::checkSupport(), regionToFace::combine(), vtkPV4Foam::convertVolField(), vtkPV3Foam::convertVolFields(), slidingInterface::coupleInterface(), meshRefinement::createBaffles(), autoRefineDriver::danglingCellRefine(), attachDetach::detachInterface(), immersedBoundaryFvPatch::findCellCells(), findCellsIntersectingSurface::findIntersectedCells(), faceCoupleInfo::findSlavesCoveringMaster(), dynamicIndexedOctree::findSphere(), indexedOctree< Foam::treeDataFace >::findSphere(), motionSmootherAlgo::getAffectedFacesAndPoints(), cellDistFuncs::getPointNeighbours(), removePoints::getUnrefimentSet(), triSurfaceTools::getVertexVertices(), InflationInjection< CloudType >::InflationInjection(), main(), immersedBoundaryFvPatch::makeIbCellCells(), immersedBoundaryFvPatch::makeIbCells(), immersedBoundaryFvPatch::makeIbInsideFaces(), immersedBoundaryFvPatch::makeIbInternalFaces(), immersedBoundaryFvPatch::makeTriAddressing(), Foam::MapConsistentSubMesh(), cellClassification::markCells(), merge(), objectRegistry::names(), cellToFaceStencil::unionEqOp::operator()(), cellToCellStencil::unionEqOp::operator()(), ParticleErosion< CloudType >::ParticleErosion(), PatchPostProcessing< CloudType >::PatchPostProcessing(), Foam::polyMeshZipUpCells(), slidingInterface::projectPoints(), polyMeshGenPoints::read(), polyMeshGenCells::read(), residuals::read(), polyMeshGenFaces::read(), triSurface::readTRI(), refineImmersedBoundaryMesh::refinementCells(), autoRefineDriver::refinementInterfaceRefine(), layerAdditionRemoval::removeCellLayer(), cellSetOption::setCellSet(), fvMeshSubset::setCellSubset(), hexRef8::setUnrefinement(), uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs(), meshOctreeModifier::updateCommunicationPattern(), Foam::meshTools::writeOBJ(), and polyMeshGenModifier::zipUpCells().
Foam::List< Key > sortedToc | ( | ) | const |
Return the table of contents as a sorted list.
Definition at line 216 of file HashTable.C.
Referenced by preservePatchesConstraint::add(), singleProcessorFaceSetsConstraint::add(), preservePatchesConstraint::apply(), edgeMeshFormatsCore::checkSupport(), autoRefineDriver::doRefine(), DispersionRASModel< CloudType >::epsilonModel(), patchProbes::findElements(), coupleGroupIdentifier::findOtherPatchID(), DispersionRASModel< CloudType >::kModel(), BrownianMotionForce< CloudType >::kModel(), main(), Foam::mergeAndWrite(), sampledPatch::patchIDs(), externalCoupledFunctionObject::read(), objectRegistry::sortedNames(), externalCoupledFunctionObject::writeGeometry(), and meshRefinement::zonify().
Foam::Ostream & printInfo | ( | Ostream & | os | ) | const |
Print information.
Definition at line 58 of file HashTableIO.C.
Referenced by main().
|
inline |
Insert a new hashedEntry.
Definition at line 80 of file HashTableI.H.
Referenced by triSurfaceMesh::addFaceToEdge(), meshRefinement::allocateInterRegionFaceZone(), globalMeshData::calcSharedEdges(), polyMesh::checkEdgeAlignment(), primitiveMesh::checkEdgeAlignment(), objectRegistry::checkIn(), Foam::checkWedges(), meshStructure::correct(), patchPatchDist::correct(), globalMeshData::countSharedEdges(), cyclicPolyPatch::coupledEdges(), cyclicGAMGInterface::cyclicGAMGInterface(), autoRefineDriver::doRefine(), extractPatchGroups(), extractSurface(), fvMeshDistribute::findCouples(), polyBoundaryMesh::groupPatchIDs(), chemkinReader::initReactionKeywordTable(), HashSet< label, Hash< label > >::insert(), surfaceInterpolateFields::interpolateFields(), objectRegistry::lookupClass(), main(), Foam::MapConsistentSubMesh(), PatchTools::matchEdges(), edgeMesh::mergeEdges(), edgeMesh::mergePoints(), polyBoundaryMesh::neighbourEdges(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator=(), boundaryMesh::patchify(), processorGAMGInterface::processorGAMGInterface(), functionObjectList::read(), wallBoundedStreamLine::read(), triSurface::readOBJ(), triSurface::readTRI(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::resize(), tetDecomposer::setRefinement(), surfaceFeatures::surfaceFeatures(), boundaryCutter::updateMesh(), meshCutAndRemove::updateMesh(), meshCutter::updateMesh(), wallLayerCells::wallLayerCells(), meshReader::warnDuplicates(), and meshRefinement::zonify().
|
inline |
Assign a new hashedEntry, overwriting existing entries.
bool erase | ( | const iterator & | ) |
Erase a hashedEntry specified by given iterator.
This invalidates the iterator until the next operator++
Referenced by topoSetSource::addOrDelete(), fieldToCell::applyToSet(), normalToFace::applyToSet(), meshOctreeAddressing::checkAndFixIrregularConnections(), objectRegistry::checkOut(), cyclicPolyPatch::coupledEdges(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase(), immersedBoundaryFvPatch::findCellCells(), cellDistFuncs::getPointNeighbours(), main(), polyBoundaryMesh::matchGroups(), polyBoundaryMesh::neighbourEdges(), probes::prepare(), vtkUnstructuredReader::read(), HashPtrTable< ThermoType >::remove(), perfectInterface::setRefinement(), faceCollapser::setRefinement(), and HashSet< label, Hash< label > >::unset().
bool erase | ( | const Key & | ) |
Erase a hashedEntry specified by the given key.
Remove entries given by the listed keys from this HashTable.
Return the number of elements removed
void resize | ( | const label | newSize | ) |
Resize the hash table for efficiency.
Definition at line 436 of file HashTable.C.
Referenced by polyMesh::checkEdgeAlignment(), primitiveMesh::checkEdgeAlignment(), Foam::checkWedges(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::clearStorage(), MGridGenGAMGAgglomeration::detectSharedFaces(), fvMeshDistribute::distribute(), doCommand(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator=(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::shrink().
void clear | ( | ) |
Clear all entries from table.
Definition at line 473 of file HashTable.C.
Referenced by chemkinReader::addReaction(), decompositionMethod::calcCellCells(), cellToCellStencil::calcFaceCells(), cellToFaceStencil::calcFaceCells(), FECCellToFaceStencil::calcFaceStencil(), cellToFaceStencil::calcFaceStencil(), globalMeshData::calcSharedEdges(), isoSurfaceCell::calcSnappedPoint(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), meshSurfaceCheckInvertedVertices::checkVertices(), HashPtrTable< ThermoType >::clear(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::clearStorage(), slidingInterface::coupleInterface(), MGridGenGAMGAgglomeration::detectSharedFaces(), edgeCollapser::determineDuplicatePointsOnFace(), doCommand(), meshOctreeModifier::ensureCorrectRegularity(), meshOptimizer::findBadFaces(), Foam::polyMeshGenChecks::findBadFaces(), Foam::polyMeshGenChecks::findBadFacesRelaxed(), checkNonMappableCellConnections::findCells(), meshOptimizer::findLowQualityFaces(), Foam::polyMeshGenChecks::findLowQualityFaces(), checkBoundaryFacesSharingTwoEdges::findPoints(), Foam::polyMeshGenChecks::findWorstQualityFaces(), triSurfaceMesh::isSurfaceClosed(), meshOctreeModifier::markAdditionalLayers(), meshOctreeModifier::markAdditionalLayersOfFaceNeighbours(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator=(), slidingInterface::projectPoints(), wallBoundedStreamLine::read(), globalPoints::receivePatchPoints(), meshOctreeCreator::refineBoxesNearDataBoxes(), tetDecomposer::setRefinement(), autoRefineDriver::shellRefine(), meshRefinement::splitFacesUndo(), surfaceFeatures::surfaceFeatures(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::transfer(), and extendedUpwindCellToFaceStencil::transportStencil().
void clearStorage | ( | ) |
Clear the table entries and the table itself.
Equivalent to clear() followed by resize(0)
Definition at line 497 of file HashTable.C.
void shrink | ( | ) |
Shrink the allocated table to approx. twice number of elements.
Definition at line 505 of file HashTable.C.
Referenced by main().
Transfer the contents of the argument table into this table.
and annul the argument table.
Definition at line 518 of file HashTable.C.
Referenced by primitiveMesh::checkEdgeLength(), findCellsIntersectingSurface::findIntersectedCells(), meshOctreeAddressing::findUsedBoxes(), polyBoundaryMesh::matchGroups(), polyTopoChange::renumber(), motionSmootherAlgo::scaleMesh(), extendedEdgeMesh::transfer(), and updateCellSet().
|
inline |
Transfer contents to the Xfer container.
Definition at line 102 of file HashTableI.H.
Find and return a hashedEntry.
Find and return a hashedEntry.
Find and return a hashedEntry, create it null if not present.
Definition at line 143 of file HashTableI.H.
Assignment.
Definition at line 542 of file HashTable.C.
Equality. Hash tables are equal if the keys and values are equal.
Independent of table storage size and table order.
Definition at line 573 of file HashTable.C.
Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator!=().
The opposite of the equality operation. Takes linear time.
Definition at line 599 of file HashTable.C.
|
inline |
Iterator set to the beginning of the HashTable.
Definition at line 417 of file HashTableI.H.
Referenced by meshOctreeAddressing::checkAndFixIrregularConnections(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModel(), polyBoundaryMesh::matchGroups(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::pyrModel(), and triSurface::readOBJ().
|
inline |
const_iterator set to the beginning of the HashTable
Definition at line 512 of file HashTableI.H.
Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::begin(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator=(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator==(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::resize().
|
inline |
const_iterator set to the beginning of the HashTable
Definition at line 520 of file HashTableI.H.
Foam::label erase | ( | const HashTable< AnyType, Key, AnyHash > & | rhs | ) |
Definition at line 415 of file HashTable.C.
|
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< Foam::autoPtr< Foam::interfaceCompositionModel > >::begin(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase().
|
friend |
Declare friendship with the const_iterator.
Definition at line 192 of file HashTable.H.
Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::cbegin(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator=(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator==(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::resize().
const typedef 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.
|
private |
The current number of elements in table.
Definition at line 152 of file HashTable.H.
Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::clear(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::shrink(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::transfer().
|
private |
Number of primary entries allocated in table.
Definition at line 155 of file HashTable.H.
Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::clear(), HashTable::iteratorBase::increment(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator=(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::resize(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::shrink(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::transfer().
|
private |
The table of primary entries.
Definition at line 158 of file HashTable.H.
Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::clear(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::resize(), and HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::transfer().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.