Factory and other methods for bitSet. More...
Functions | |
bitSet | create (const label n, const labelHashSet &locations, const bool on=true) |
Create a bitSet with length n with the specified on locations. More... | |
bitSet | create (const label n, const labelUList &locations, const bool on=true) |
Create a bitSet with length n with the specified on locations. More... | |
bitSet | create (const label n, const label select, const labelUList &values, const bool on=true) |
Factory and other methods for bitSet.
Foam::bitSet create | ( | const label | n, |
const labelHashSet & | locations, | ||
const bool | on = true |
||
) |
Create a bitSet with length n with the specified on locations.
The resulting bitSet is guaranteed to have exactly the specified length, any values or positions larger than n-1 are silently ignored.
n | the size of the output bitSet |
locations | the list of positions corresponding to an on bit. |
on | the value for on. Set as false to invert the logic. |
Definition at line 35 of file BitOps.C.
References n, and bitSet::set().
Referenced by codeStream::getFunction(), profiling::profiling(), and fvMeshSubset::setCellSubset().
Foam::bitSet create | ( | const label | n, |
const labelUList & | locations, | ||
const bool | on = true |
||
) |
Create a bitSet with length n with the specified on locations.
The resulting bitSet is guaranteed to have exactly the specified length, any values or positions larger than n-1 are silently ignored.
n | the size of the output bitSet |
locations | the list of positions corresponding to an on bit. |
on | the value for on. Set as false to invert the logic. |
Definition at line 57 of file BitOps.C.
References n, and bitSet::set().
Foam::bitSet create | ( | const label | n, |
const label | select, | ||
const labelUList & | values, | ||
const bool | on = true |
||
) |
Create a bitSet with length n with the specified on locations when the list values are equal to the select value.
The resulting bitSet is guaranteed to have exactly the specified length, any values or positions larger than n-1 are silently ignored.
n | the size of the output bitSet |
select | the value to select as 'on' |
values | the values to scan for 'select' |
on | the value for on. Set as false to invert the logic. |
Definition at line 79 of file BitOps.C.
References Foam::min(), n, bitSet::set(), and Foam::HashTableOps::values().