Loading...
Searching...
No Matches
Foam::BitSetOps Namespace Reference

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.
bitSet create (const label n, const labelUList &locations, const bool on=true)
 Create a bitSet with length n with the specified on locations.
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.

Detailed Description

Factory and other methods for bitSet. Adaptor methods for other containers that are somewhat similar to bitSet (eg, boolList, labelHashSet).

Function Documentation

◆ create() [1/3]

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.

Parameters
nthe size of the output bitSet
locationsthe list of positions corresponding to an on bit.
onthe value for on. Set as false to invert the logic.
Returns
a bitset

Definition at line 232 of file BitOps.C.

References n, and bitSet::set().

Referenced by Foam::invertCellSelection(), fvMeshSubset::reset(), fvMeshSubset::reset(), and fvMeshSubset::reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create() [2/3]

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.

Parameters
nthe size of the output bitSet
locationsthe list of positions corresponding to an on bit.
onthe value for on. Set as false to invert the logic.
Returns
a bitset

Definition at line 254 of file BitOps.C.

References n, and bitSet::set().

Here is the call graph for this function:

◆ create() [3/3]

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.

Parameters
nthe size of the output bitSet
selectthe value to select as 'on'
valuesthe values to scan for 'select'
onthe value for on. Set as false to invert the logic.
Returns
a bitset

Definition at line 276 of file BitOps.C.

References n, and bitSet::set().

Here is the call graph for this function: