vecs
Fast, flexible ecs in C++ with ergonomic API
|
A dynamic bitset that automatically grows to support an arbitrary number of bits. More...
#include <dynamic_bitset.h>
Public Types | |
using | size_type = std::uint64_t |
using | block_type = std::uint64_t |
Public Member Functions | |
dynamic_bitset (size_type value) | |
size_type | size () const |
void | clear () |
void | resize (size_type nbits) |
dynamic_bitset & | masked_and_not (dynamic_bitset &exclude_mask) |
dynamic_bitset & | operator&= (const dynamic_bitset &rhs) |
dynamic_bitset & | operator|= (const dynamic_bitset &rhs) |
dynamic_bitset & | operator^= (const dynamic_bitset &rhs) |
dynamic_bitset | operator~ () const |
dynamic_bitset & | operator<<= (size_type shift) |
dynamic_bitset & | operator>>= (size_type shift) |
bool | operator[] (size_type pos) const |
void | set (size_type pos, bool value=true) |
void | reset (size_type pos) |
void | flip (size_type pos) |
bool | operator== (const dynamic_bitset &rhs) const |
bool | operator!= (const dynamic_bitset &rhs) const |
size_type | count () const |
bool | any () const |
bool | none () const |
bool | contains (const dynamic_bitset &other) const |
bool | test (size_type pos) const |
std::string | to_string () const |
Static Public Attributes | |
static constexpr size_type | bits_per_block |
Friends | |
struct | std::hash< dynamic_bitset > |
dynamic_bitset | operator& (dynamic_bitset lhs, const dynamic_bitset &rhs) |
dynamic_bitset | operator| (dynamic_bitset lhs, const dynamic_bitset &rhs) |
dynamic_bitset | operator^ (dynamic_bitset lhs, const dynamic_bitset &rhs) |
dynamic_bitset | operator<< (dynamic_bitset lhs, size_type shift) |
dynamic_bitset | operator>> (dynamic_bitset lhs, size_type shift) |
A dynamic bitset that automatically grows to support an arbitrary number of bits.
|
staticconstexpr |