Factory and other methods for bitSet. Adaptor methods for other containers that are somewhat similar to bitSet (eg, boolList, labelHashSet). 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) |
Create a bitSet with length n with the specified on locations when the list values are equal to the select value. More... | |
Factory and other methods for bitSet. Adaptor methods for other containers that are somewhat similar to bitSet (eg, boolList, labelHashSet).
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 228 of file BitOps.C.
References n, and Foam::output().
Referenced by Foam::invertCellSelection(), profiling::profiling(), and fvMeshSubset::reset().
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 250 of file BitOps.C.
References n, and Foam::output().
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 272 of file BitOps.C.
References Foam::min(), n, Foam::output(), Foam::BitOps::select(), and Foam::HashTableOps::values().