|
| BitSet (size_t numBits, bool fillValue) |
| creates bitset of given size filled with given value
|
|
| BitSet (size_t, unsigned long)=delete |
| prohibit these constructors inherited from boost::dynamic_bitset, which can initialize only few initial bits
|
|
template<class T , std::enable_if_t< std::is_arithmetic< T >::value, std::nullptr_t > = nullptr> |
| BitSet (T, T)=delete |
|
bool | test (IndexType n) const |
|
bool | test_set (IndexType n, bool val=true) |
|
BitSet & | set (IndexType n, size_type len, bool val) |
|
BitSet & | set (IndexType n, bool val) |
|
BitSet & | set (IndexType n) |
|
BitSet & | set () |
|
BitSet & | reset (IndexType n, size_type len) |
|
BitSet & | reset (IndexType n) |
|
BitSet & | reset () |
|
BitSet & | flip (IndexType n, size_type len) |
|
BitSet & | flip (IndexType n) |
|
BitSet & | flip () |
|
const auto & | bits () const |
| read-only access to all bits stored as a vector of uint64 blocks
|
|
MRMESH_API BitSet & | operator&= (const BitSet &b) |
|
MRMESH_API BitSet & | operator|= (const BitSet &b) |
|
MRMESH_API BitSet & | operator^= (const BitSet &b) |
|
MRMESH_API BitSet & | operator-= (const BitSet &b) |
|
MRMESH_API BitSet & | subtract (const BitSet &b, int bShiftInBlocks) |
| subtracts b from this, considering that bits in b are shifted right on bShiftInBlocks*bits_per_block
|
|
MRMESH_API IndexType | find_last () const |
| return the highest index i such as bit i is set, or npos if *this has no on bits.
|
|
MRMESH_API size_t | nthSetBit (size_t n) const |
| returns the location of nth set bit (where the first bit corresponds to n=0) or npos if there are less bit set
|
|
MRMESH_API bool | is_subset_of (const BitSet &a) const |
| returns true if, for every bit that is set in this bitset, the corresponding bit in bitset a is also set. Otherwise this function returns false.
|
|
bool | is_proper_subset_of (const BitSet &a) const =delete |
| returns true if, for every bit that is set in this bitset, the corresponding bit in bitset a is also set and if this->count() < a.count(). Otherwise this function returns false.
|
|
void | resizeWithReserve (size_t newSize) |
| doubles reserved memory until resize(newSize) can be done without reallocation
|
|
void | autoResizeSet (size_t pos, size_type len, bool val=true) |
| sets elements [pos, pos+len) to given value, adjusting the size of the set to include new elements
|
|
void | autoResizeSet (size_t pos, bool val=true) |
|
bool | autoResizeTestSet (size_t pos, bool val=true) |
| same as autoResizeSet and returns previous value of pos-bit
|
|
size_t | heapBytes () const |
| returns the amount of memory this object occupies on heap
|
|
IndexType | backId () const |
| returns the identifier of the back() element
|
|
IndexType | endId () const |
|
std::vector<bool> like container (random-access, size_t - index type, bool - value type) with all bits after size() considered off during testing