Constexpr bitset class. More...
#include <Bitset.h>
Public Member Functions | |
Constructor | |
constexpr | Bitset () |
Zeroing constructor. More... | |
Modification | |
constexpr void | zero () |
Zero out all bits. More... | |
constexpr void | set (const std::size_t i) |
Sets a specific bit. More... | |
constexpr void | unset (const std::size_t i) |
Unsets a specific bit. More... | |
constexpr void | set (const std::size_t i, const bool value) |
Sets a specific bit to a specified value. More... | |
Information | |
constexpr bool | test (const std::size_t i) const |
Test the value at a particular bit. More... | |
Private Types | |
Types | |
using | Block = long long unsigned |
Private Attributes | |
State | |
Array< Block, B > | storage |
Static Private Attributes | |
Static const values | |
static constexpr std::size_t | bitsPerBlock |
Number of bits per block. More... | |
static constexpr std::size_t | B |
Number of Block types stored. More... | |
Constexpr bitset class.
N | Number of bits to store. |
|
inlineexplicit |
Zeroing constructor.
Complexity \(\Theta(N)\)
|
inline |
Sets a specific bit.
Complexity \(\Theta(1)\)
|
inline |
Sets a specific bit to a specified value.
Complexity \(\Theta(1)\)
|
inline |
Test the value at a particular bit.
Complexity \(\Theta(1)\)
|
inline |
Unsets a specific bit.
Complexity \(\Theta(1)\)
|
inline |
Zero out all bits.
Complexity \(\Theta(N)\)
|
staticprivate |
Number of Block types stored.
|
staticprivate |
Number of bits per block.