|
| | TypedBitSet (const BitSet &src) |
| | copies all bits from another BitSet (or a descending class, e.g. TypedBitSet)
|
| |
| | TypedBitSet (BitSet &&src) |
| | moves all bits from another BitSet (or a descending class, e.g. TypedBitSet)
|
| |
| TypedBitSet & | set (IndexType n, size_type len, bool val) |
| |
| TypedBitSet & | set (IndexType n, bool val) |
| |
| TypedBitSet & | set (IndexType n) |
| |
| TypedBitSet & | set () |
| |
| TypedBitSet & | reset (IndexType n, size_type len) |
| |
| TypedBitSet & | reset (IndexType n) |
| |
| TypedBitSet & | reset () |
| |
| TypedBitSet & | flip (IndexType n, size_type len) |
| |
| TypedBitSet & | flip (IndexType n) |
| |
| TypedBitSet & | flip () |
| |
| bool | test (IndexType n) const |
| |
| bool | test_set (IndexType n, bool val=true) |
| |
| IndexType | find_first () const |
| |
| IndexType | find_next (IndexType pos) const |
| |
| IndexType | find_last () const |
| |
| IndexType | nthSetBit (size_t n) const |
| | returns the location of nth set bit (where the first bit corresponds to n=0) or IndexType(npos) if there are less bit set
|
| |
| TypedBitSet & | operator&= (const TypedBitSet &b) |
| |
| TypedBitSet & | operator|= (const TypedBitSet &b) |
| |
| TypedBitSet & | operator^= (const TypedBitSet &b) |
| |
| TypedBitSet & | operator-= (const TypedBitSet &b) |
| |
| TypedBitSet & | subtract (const TypedBitSet &b, int bShiftInBlocks) |
| | subtracts b from this, considering that bits in b are shifted right on bShiftInBlocks*bits_per_block
|
| |
| bool | is_subset_of (const TypedBitSet &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 | intersects (const TypedBitSet &a) const |
| | returns true if, there is a bit which is set in this bitset, such that the corresponding bit in bitset a is also set. Otherwise this function returns false.
|
| |
| void | autoResizeSet (IndexType pos, size_type len, bool val=true) |
| |
| void | autoResizeSet (IndexType pos, bool val=true) |
| |
| bool | autoResizeTestSet (IndexType pos, bool val=true) |
| |
| template<typename M > |
| TypedBitSet | getMapping (const M &map) const |
| | constructs another bit set from this where every set bit index is transformed using given map
|
| |
| TypedBitSet | getMapping (const Vector< IndexType, IndexType > &map) const |
| |
| TypedBitSet | getMapping (const BMap< IndexType, IndexType > &map) const |
| |
| TypedBitSet | getMapping (const HashMap< IndexType, IndexType > &map) const |
| |
| template<typename M > |
| TypedBitSet | getMapping (const M &map, size_t resSize) const |
| | this is a faster version if the result size is known beforehand
|
| |
| TypedBitSet | getMapping (const Vector< IndexType, IndexType > &map, size_t resSize) const |
| |
| TypedBitSet | getMapping (const HashMap< IndexType, IndexType > &map, size_t resSize) const |
| |
| IndexType | backId () const |
| | returns the identifier of the back() element
|
| |
| IndexType | endId () const |
| |
| template<typename M > |
| TypedBitSet< I > | getMapping (const M &map) const |
| |
| template<typename M > |
| TypedBitSet< I > | getMapping (const M &map, size_t resSize) const |
| |
| | BitSet () noexcept=default |
| | creates empty bitset
|
| |
| | BitSet (size_t numBits, bool fillValue=false) |
| | creates bitset of given size filled with given value
|
| |
| void | reserve (size_type numBits) |
| |
| MRMESH_API void | resize (size_type numBits, bool fillValue=false) |
| |
| void | clear () |
| |
| void | shrink_to_fit () |
| |
| bool | empty () const noexcept |
| |
| size_type | size () const noexcept |
| |
| size_type | num_blocks () const noexcept |
| |
| size_type | capacity () const noexcept |
| |
| bool | uncheckedTest (IndexType n) const |
| |
| bool | uncheckedTestSet (IndexType n, bool val=true) |
| |
| bool | test (IndexType n) const |
| |
| bool | test_set (IndexType n, bool val=true) |
| |
| MRMESH_API BitSet & | set (IndexType n, size_type len, bool val) |
| |
| BitSet & | set (IndexType n, bool val) |
| |
| BitSet & | set (IndexType n) |
| |
| MRMESH_API BitSet & | set () |
| |
| MRMESH_API BitSet & | reset (IndexType n, size_type len) |
| |
| BitSet & | reset (IndexType n) |
| |
| MRMESH_API BitSet & | reset () |
| |
| MRMESH_API BitSet & | flip (IndexType n, size_type len) |
| |
| BitSet & | flip (IndexType n) |
| |
| MRMESH_API BitSet & | flip () |
| |
| MRMESH_API void | reverse () |
| | changes the order of bits on the opposite
|
| |
| void | push_back (bool val) |
| | adds one more bit with the given value in the container, increasing its size on 1
|
| |
| void | pop_back () |
| | removes last bit from the container, decreasing its size on 1
|
| |
| 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 bool | all () const |
| | returns true if all bits in this container are set
|
| |
| MRMESH_API bool | any () const |
| | returns true if at least one bits in this container is set
|
| |
| bool | none () const |
| | returns true if all bits in this container are reset
|
| |
| MRMESH_API size_type | count () const noexcept |
| | computes the number of set bits in the whole set
|
| |
| IndexType | find_first () const |
| | return the smallest index i such that bit i is set, or npos if *this has no on bits.
|
| |
| IndexType | find_next (IndexType n) const |
| | return the smallest index i>n such that bit i is set, or npos if *this has no on bits.
|
| |
| MRMESH_API IndexType | find_last () const |
| | return the highest index i such that 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.
|
| |
| MRMESH_API bool | intersects (const BitSet &a) const |
| | returns true if, there is a bit which is set in this bitset, such that the corresponding bit in bitset a is also set. 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 |
| |
template<typename
I>
class MR::TypedBitSet< I >
Vector<bool, I> like container (random-access, I - index type, bool - value type) with all bits after size() considered off during testing