|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Simple bitset implementation for bloom filter. More...
Public Member Functions | |
| Bitset (std::size_t) | |
| BitSet class constructor. | |
| std::size_t | size () |
| Utility function to return the size of the inner array. | |
| void | add (std::size_t) |
| Turn bit on position x to 1s. | |
| bool | contains (std::size_t) |
| Doest bitset contains element x. | |
Private Attributes | |
| std::vector< std::size_t > | data |
| short info of this variable | |
Static Private Attributes | |
| static const std::size_t | blockSize |
Simple bitset implementation for bloom filter.
|
explicit |
BitSet class constructor.
| initSize | amount of blocks, each contain sizeof(std::size_t) bits |
| void data_structures::Bitset::add | ( | std::size_t | x | ) |
Turn bit on position x to 1s.
| x | position to turn bit on |
| bool data_structures::Bitset::contains | ( | std::size_t | x | ) |
Doest bitset contains element x.
| x | position in bitset to check |
| std::size_t data_structures::Bitset::size | ( | ) |
|
staticprivate |
size of integer type, that we are using in our bitset