TheAlgorithms/C++ 1.0.0
All the 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.
Definition at line 40 of file bloom_filter.cpp.
|
explicit |
BitSet class constructor.
initSize | amount of blocks, each contain sizeof(std::size_t) bits |
Definition at line 63 of file bloom_filter.cpp.
void data_structures::Bitset::add | ( | std::size_t | x | ) |
Turn bit on position x to 1s.
x | position to turn bit on |
Definition at line 71 of file bloom_filter.cpp.
bool data_structures::Bitset::contains | ( | std::size_t | x | ) |
Doest bitset contains element x.
x | position in bitset to check |
Definition at line 86 of file bloom_filter.cpp.
std::size_t data_structures::Bitset::size | ( | ) |
Utility function to return the size of the inner array.
Definition at line 57 of file bloom_filter.cpp.
|
staticprivate |
size of integer type, that we are using in our bitset
Definition at line 43 of file bloom_filter.cpp.
|
private |
short info of this variable
Definition at line 42 of file bloom_filter.cpp.