Template class implements memory saving set functionality. More...
#include <bmvmin.h>
Public Member Functions | |
miniset () | |
miniset (const miniset &mset) | |
~miniset () | |
unsigned | test (bm::id_t n) const |
Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. | |
void | set (bm::id_t n, bool val=true) |
unsigned | mem_used () const |
void | swap (miniset &mset) |
Template class implements memory saving set functionality.
Template can be used as template parameter for bvector if we want to tune bvector for minimal memory consumption.
Definition at line 58 of file bmvmin.h.
bm::miniset< A, N >::miniset | ( | ) | [inline] |
bm::miniset< A, N >::miniset | ( | const miniset< A, N > & | mset | ) | [inline] |
bm::miniset< A, N >::~miniset | ( | ) | [inline] |
Definition at line 83 of file bmvmin.h.
References BM_MINISET_ARRSIZE, and BM_MINISET_GAPLEN.
unsigned bm::miniset< A, N >::mem_used | ( | ) | const [inline] |
Definition at line 140 of file bmvmin.h.
References BM_MINISET_ARRSIZE, and BM_MINISET_GAPLEN.
void bm::miniset< A, N >::set | ( | bm::id_t | n, | |
bool | val = true | |||
) | [inline] |
Definition at line 106 of file bmvmin.h.
References BM_MINISET_GAPLEN, bm::gap_set_value(), bm::set_word_mask, and bm::set_word_shift.
void bm::miniset< A, N >::swap | ( | miniset< A, N > & | mset | ) | [inline] |
unsigned bm::miniset< A, N >::test | ( | bm::id_t | n | ) | const [inline] |
Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.
Definition at line 95 of file bmvmin.h.
References bm::gap_test(), bm::set_word_mask, and bm::set_word_shift.