Go to the documentation of this file.
72 inline label first_not_block()
const;
129 inline static const bitSet&
null();
145 inline explicit
bitSet(const label
n);
148 inline
bitSet(const label
n, const
bool val);
193 inline
bitSet(const label
n, std::initializer_list<label> locations);
221 inline
bool all() const;
225 inline
bool any() const;
229 inline
bool none() const;
238 inline
unsigned int count(const
bool on=true) const;
248 inline
bool test(const label
pos) const;
253 inline
bool found(const label
pos) const;
298 inline
void fill(const
bool val);
352 inline
void flip(const label
pos);
394 template<class InputIter>
395 label
setMany(InputIter first, InputIter last);
421 template<class InputIter>
422 label
unset(InputIter first, InputIter last);
473 inline void operator=(
const unsigned int val);
476 inline operator unsigned int ()
const;
544 inline
unsigned int operator[](const label i) const;
593 void assign(
const unsigned int val) { this->
fill(val); }
600 template<>
struct Hash<
bitSet> : bitSet::hasher {};
bool found(const label pos) const
Test value at specified position, never auto-vivify entries.
bitSet & andEq(const bitSet &other)
The set logical AND.
const_iterator end() const noexcept
Iterator beyond the end of the bitSet.
label find_first() const
Locate the first bit that is set.
bitSet() noexcept
Default construct an empty, zero-sized set.
List< bool > bools(const labelHashSet &locations)
A helper class for outputting values to Ostream.
bool all() const
True if all bits in this bitset are set or if the set is empty.
bitSet & xorEq(const bitSet &other, const bool strict=true)
The set logical XOR.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
friend Ostream & operator(Ostream &os, const InfoProxy< PackedList< Width >> &info)
bitSet & bound(const label maxSize)
Ensure the addressable range does not exceed maxSize.
autoPtr< bitSet > clone() const
Clone.
A reference supporting read/write access to an entry.
bitSet & unset(const bitSet &other)
bool any() const
True if any bits in this bitset are set.
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
ClassName("bitSet")
Declare type-name (with debug switch)
const_iterator cend() const noexcept
Iterator beyond the end of the bitSet.
const_iterator & operator++()
Move to the next on position.
void set(const bitSet &bitset)
Set specified bits from another bitset.
label setMany(InputIter first, InputIter last)
Set the locations listed by the iterator range,.
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
bitSet bitset(const labelHashSet &locations)
Transform the on locations to a bitSet.
label operator*() const noexcept
Return the current on position.
unsigned int count(const bool on=true) const
Count number of bits set.
InfoProxy< bitSet > info() const
Return info proxy.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
labelList toc() const
The indices of the on bits as a sorted labelList.
const_iterator cbegin() const
Iterator set to the position of the first on bit.
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
label find_last() const
Locate the last bit set.
void fill(const bool val)
Assign all entries to the given value.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
A const_iterator for iterating across on values.
label find_first_not() const
Locate the first bit that is unset.
A range or interval of labels defined by a start and a size.
void assign(const UList< bool > &bools)
Copy assign all entries from a list of bools.
bitSet & minusEq(const bitSet &other)
The set difference.
unsigned int const_reference
const_iterator begin() const
Iterator set to the position of the first on bit.
bool operator!=(const const_iterator &iter) const noexcept
void flip()
Invert all bits in the addressable region.
bitSet & orEq(const bitSet &other, const bool strict=true)
The set logical OR.
label find_next(label pos) const
Locate the next bit set, starting one beyond the specified position.
OBJstream os(runTime.globalPath()/outputName)
bitSet & operator=(const bitSet &bitset)
Copy assignment.
bool intersects(const bitSet &other) const
True if any bits in the other bitset intersect (are the same).
bool none() const
True if no bits in this bitset are set.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
void swap(bitSet &bitset)
Swap contents.
bitSet & extend(const label minSize)
Ensure that minSize is covered by the bitSet.
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
A 1D vector of objects of type <T> with a fixed length <N>.
bool operator==(const const_iterator &iter) const noexcept
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Vector< label > N(dict.get< Vector< label >>("N"))
bitSet operator^(const bitSet &a, const bitSet &b)
Bitwise-XOR of two bitsets to form a unique bit-set.
bitSet operator|(const bitSet &a, const bitSet &b)
Bitwise-OR of two bitsets.
List< bool > values() const
Return the bitset values as a boolList.
labelList sortedToc() const
The indices of the on bits as a sorted labelList.
void transfer(bitSet &bitset)
dimensionedScalar pos(const dimensionedScalar &ds)