Go to the documentation of this file.
72 inline label first_not_block()
const;
134 inline static const bitSet&
null();
150 inline explicit
bitSet(const label
n);
153 inline
bitSet(const label
n, const
bool val);
198 inline
bitSet(const label
n, std::initializer_list<label> locations);
226 inline
bool all() const;
230 inline
bool any() const;
234 inline
bool none() const;
243 inline
unsigned int count(const
bool on=true) const;
253 inline
bool test(const label
pos) const;
258 inline
bool found(const label
pos) const;
303 inline
void fill(const
bool val);
357 inline
void flip(const label
pos);
399 template<class InputIter>
400 label
setMany(InputIter first, InputIter last);
426 template<class InputIter>
427 label
unset(InputIter first, InputIter last);
478 inline void operator=(
const unsigned int val);
481 inline operator unsigned int ()
const;
549 inline
unsigned int operator[](const label i) const;
608 void assign(
const unsigned int val) { this->
fill(val); }
619 Ostream&
operator<<(Ostream& os,
const InfoProxy<bitSet>& info);
627 inline bitSet
operator&(
const bitSet& a,
const bitSet&
b);
631 inline bitSet
operator|(
const bitSet& a,
const bitSet&
b);
635 inline bitSet
operator^(
const bitSet& a,
const bitSet&
b);
639 inline bitSet
operator-(
const bitSet& a,
const bitSet&
b);
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.
A class for handling words, derived from Foam::string.
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,.
void writeEntry(Ostream &os) const
Write as a dictionary entry.
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.
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
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write bitSet, with line-breaks (ASCII) when length exceeds shortLen.
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.
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)