|
libhatchet
|
#include <hxbitset.hpp>
Public Member Functions | |
| constexpr | hxbitset (void) |
| constexpr | hxbitset (size_t val_) |
| constexpr | hxbitset (const hxbitset &x_) |
| constexpr void | operator= (const hxbitset &x_) |
| constexpr bool | operator[] (size_t pos_) const |
| constexpr hxbitset & | operator&= (const hxbitset &x_) |
| constexpr hxbitset & | operator|= (const hxbitset &x_) |
| constexpr hxbitset & | operator^= (const hxbitset &x_) |
| constexpr hxbitset & | operator<<= (size_t count_) |
| constexpr hxbitset & | operator>>= (size_t count_) |
| constexpr bool | operator== (const hxbitset &x_) const |
| constexpr bool | all (void) const |
| constexpr bool | any (void) const |
| constexpr size_t * | data (void) |
| constexpr const size_t * | data (void) const |
| constexpr hxbitset & | flip (void) |
| constexpr hxbitset & | flip (size_t pos_) |
| void | load (const void *src_, size_t len_) |
| constexpr bool | none (void) const |
| constexpr hxbitset & | reset (void) |
| constexpr hxbitset & | reset (size_t pos_) |
| constexpr hxbitset & | set (void) |
| constexpr hxbitset & | set (size_t pos_, bool value_=true) |
| constexpr bool | test (size_t pos_) const |
Static Public Member Functions | |
| static constexpr size_t | bytes (void) |
| static constexpr size_t | size (void) |
hxbitset - A fixed-size bitset stored as an array of size_t words with no heap allocation.
|
inlineconstexpr |
Constructs a zero-initialized hxbitset.
|
explicitconstexpr |
Constructs a hxbitset from a single size_t value.
Only valid when bit_count equals the number of bits in size_t.
|
constexpr |
Returns true if all bits are set.
|
constexpr |
Returns true if at least one bit is set.
|
inlinestaticconstexpr |
Returns the size of the underlying storage in bytes.
|
inlineconstexpr |
Returns a pointer to the underlying word storage.
|
inlineconstexpr |
Returns a const pointer to the underlying word storage.
Flips the bit at position pos.
Flips all bits.
| void hxbitset< bit_count_ >::load | ( | const void * | src_, |
| size_t | len_ ) |
|
inlineconstexpr |
Returns true if no bits are set.
|
constexpr |
Applies bitwise AND with x in place.
|
constexpr |
Shifts all bits left by count positions, filling vacated bits with 0.
|
constexpr |
Returns true if all bits compare equal to those of x.
|
constexpr |
Shifts all bits right by count positions, filling vacated bits with 0.
|
constexpr |
Returns the value of the bit at position pos.
|
constexpr |
Applies bitwise XOR with x in place.
|
constexpr |
Applies bitwise OR with x in place.
Clears the bit at position pos.
Clears all bits to 0.
|
constexpr |
Sets or clears the bit at position pos.
Sets all bits to 1.
|
inlinestaticconstexpr |
Returns the number of bits.
|
constexpr |
Returns the value of the bit at position pos.