Various operations for HashSet. More...
Classes | |
struct | plusEqOp |
Combine HashSet operation. Equivalent to 'a |= b'. More... | |
Functions | |
labelHashSet | used (const bitSet &select) |
Convert a bitset to a labelHashSet of the indices used. More... | |
labelHashSet | used (const UList< bool > &select) |
Convert a list of bools to a labelHashSet of the indices used. More... | |
bitSet | bitset (const labelHashSet &locations) |
Transform the on locations to a bitSet. More... | |
List< bool > | bools (const labelHashSet &locations) |
Transform the on locations to a boolList, with true for each non-negative location and false for all others. More... | |
Various operations for HashSet.
Foam::labelHashSet used | ( | const bitSet & | select | ) |
Convert a bitset to a labelHashSet of the indices used.
select | the bitset for which an on entry corresponds to an index in the output labelHashSet |
This is equivalent of the following code, but more efficiently implemented.
Definition at line 26 of file HashOps.C.
References Foam::output(), and Foam::BitOps::select().
Referenced by mappedPatchBase::calcMapping(), polyTopoChange::changeMesh(), dynamicRefineFvMesh::init(), polyTopoChange::makeMesh(), Foam::polyMeshZipUpCells(), and HashTable< const regIOobject * >::printInfo().
Foam::labelHashSet used | ( | const UList< bool > & | select | ) |
Convert a list of bools to a labelHashSet of the indices used.
select | the boolList for which a true entry corresponds to an index in the output labelHashSet |
Definition at line 44 of file HashOps.C.
References Foam::output(), Foam::BitOps::select(), and UList< T >::size().
Foam::bitSet bitset | ( | const labelHashSet & | locations | ) |
Transform the on locations to a bitSet.
Ignored any negative values (invalid positions in a bitset).
locations | the list of positions corresponding to an on bit. |
Definition at line 63 of file HashOps.C.
References HashSet< Key, Hash >::begin(), HashSet< Key, Hash >::end(), and Foam::output().
Referenced by bitSet::bitSet(), Foam::operator<<(), bitSet::operator=(), Foam::operator~(), ZoneMesh< cellZone, polyMesh >::selection(), Foam::BitOps::set(), bitSet::set(), bitSet::swap(), bitSet::transfer(), and Foam::BitOps::unset().
Foam::List< bool > bools | ( | const labelHashSet & | locations | ) |
Transform the on locations to a boolList, with true for each non-negative location and false for all others.
locations | the list of positions corresponding to an on bit. |
Definition at line 72 of file HashOps.C.
References HashSet< Key, Hash >::begin(), HashSet< Key, Hash >::end(), Foam::max(), and Foam::output().
Referenced by Foam::BitOps::all(), Foam::BitOps::any(), bitSet::assign(), bitSet::bitSet(), Foam::BitOps::count(), Foam::BitOps::none(), Foam::BitOps::select(), Foam::BitOps::set(), parseDriver::setInternalFieldResult(), Foam::BitOps::sortedToc(), Foam::BitOps::toc(), topoBoolSet::topoBoolSet(), and Foam::BitOps::unset().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.