dlvhex
2.5.0
|
Template class implements memory saving set functionality. More...
#include <vs10/bm/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) |
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) |
Private Member Functions | |
void | init_bitbuf (bm::word_t *buf) |
void | init_gapbuf (bm::word_t *buf) |
void | convert_buf () |
void | init_bitbuf (bm::word_t *buf) |
void | init_gapbuf (bm::word_t *buf) |
void | convert_buf () |
Private Attributes | |
bm::word_t * | m_buf |
Buffer pointer. | |
unsigned | m_type |
buffer type (0-bit, 1-gap) |
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.
bm::miniset< A, N >::miniset | ( | ) | [inline] |
bm::miniset< A, N >::miniset | ( | const miniset< A, N > & | mset | ) | [inline] |
Definition at line 67 of file bmvmin.h.
References bm::miniset< A, N >::init_bitbuf(), bm::miniset< A, N >::init_gapbuf(), bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
bm::miniset< A, N >::~miniset | ( | ) | [inline] |
Definition at line 83 of file bmvmin.h.
References BM_MINISET_ARRSIZE, BM_MINISET_GAPLEN, bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
bm::miniset< A, N >::miniset | ( | ) | [inline] |
bm::miniset< A, N >::miniset | ( | const miniset< A, N > & | mset | ) | [inline] |
Definition at line 67 of file bmvmin.h.
References bm::miniset< A, N >::init_bitbuf(), bm::miniset< A, N >::init_gapbuf(), bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
bm::miniset< A, N >::~miniset | ( | ) | [inline] |
Definition at line 83 of file bmvmin.h.
References BM_MINISET_ARRSIZE, BM_MINISET_GAPLEN, bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
void bm::miniset< A, N >::convert_buf | ( | ) | [inline, private] |
Definition at line 194 of file bmvmin.h.
References BM_MINISET_ARRSIZE, BM_MINISET_GAPLEN, bm::gap_convert_to_bitset(), bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
Referenced by bm::miniset< A, N >::set().
void bm::miniset< A, N >::convert_buf | ( | ) | [inline, private] |
Definition at line 194 of file bmvmin.h.
References BM_MINISET_ARRSIZE, BM_MINISET_GAPLEN, bm::gap_convert_to_bitset(), bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
void bm::miniset< A, N >::init_bitbuf | ( | bm::word_t * | buf | ) | [inline, private] |
Definition at line 162 of file bmvmin.h.
References BM_MINISET_ARRSIZE, bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
void bm::miniset< A, N >::init_bitbuf | ( | bm::word_t * | buf | ) | [inline, private] |
Definition at line 162 of file bmvmin.h.
References BM_MINISET_ARRSIZE, bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
Referenced by bm::miniset< A, N >::miniset(), and bm::miniset< A, N >::set().
void bm::miniset< A, N >::init_gapbuf | ( | bm::word_t * | buf | ) | [inline, private] |
Definition at line 177 of file bmvmin.h.
References BM_MINISET_GAPLEN, bm::gap_max_bits, bm::gap_set_all(), bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
Referenced by bm::miniset< A, N >::miniset(), and bm::miniset< A, N >::set().
void bm::miniset< A, N >::init_gapbuf | ( | bm::word_t * | buf | ) | [inline, private] |
Definition at line 177 of file bmvmin.h.
References BM_MINISET_GAPLEN, bm::gap_max_bits, bm::gap_set_all(), bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
unsigned bm::miniset< A, N >::mem_used | ( | ) | const [inline] |
Definition at line 140 of file bmvmin.h.
References BM_MINISET_ARRSIZE, BM_MINISET_GAPLEN, bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
unsigned bm::miniset< A, N >::mem_used | ( | ) | const [inline] |
Definition at line 140 of file bmvmin.h.
References BM_MINISET_ARRSIZE, BM_MINISET_GAPLEN, bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
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::miniset< A, N >::convert_buf(), bm::gap_set_value(), bm::miniset< A, N >::init_bitbuf(), bm::miniset< A, N >::init_gapbuf(), bm::miniset< A, N >::m_buf, bm::miniset< A, N >::m_type, bm::set_word_mask, and bm::set_word_shift.
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::miniset< A, N >::convert_buf(), bm::gap_set_value(), bm::miniset< A, N >::init_bitbuf(), bm::miniset< A, N >::init_gapbuf(), bm::miniset< A, N >::m_buf, bm::miniset< A, N >::m_type, bm::set_word_mask, and bm::set_word_shift.
void bm::miniset< A, N >::swap | ( | miniset< A, N > & | mset | ) | [inline] |
Definition at line 149 of file bmvmin.h.
References bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
void bm::miniset< A, N >::swap | ( | miniset< A, N > & | mset | ) | [inline] |
Definition at line 149 of file bmvmin.h.
References bm::miniset< A, N >::m_buf, and bm::miniset< A, N >::m_type.
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::miniset< A, N >::m_buf, bm::miniset< A, N >::m_type, bm::set_word_mask, and bm::set_word_shift.
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::miniset< A, N >::m_buf, bm::miniset< A, N >::m_type, bm::set_word_mask, and bm::set_word_shift.
bm::word_t * bm::miniset< A, N >::m_buf [private] |
Buffer pointer.
Definition at line 208 of file bmvmin.h.
Referenced by bm::miniset< A, N >::convert_buf(), bm::miniset< A, N >::init_bitbuf(), bm::miniset< A, N >::init_gapbuf(), bm::miniset< A, N >::mem_used(), bm::miniset< A, N >::miniset(), bm::miniset< A, N >::set(), bm::miniset< A, N >::swap(), bm::miniset< A, N >::test(), and bm::miniset< A, N >::~miniset().
unsigned bm::miniset< A, N >::m_type [private] |
buffer type (0-bit, 1-gap)
Definition at line 209 of file bmvmin.h.
Referenced by bm::miniset< A, N >::convert_buf(), bm::miniset< A, N >::init_bitbuf(), bm::miniset< A, N >::init_gapbuf(), bm::miniset< A, N >::mem_used(), bm::miniset< A, N >::miniset(), bm::miniset< A, N >::set(), bm::miniset< A, N >::swap(), bm::miniset< A, N >::test(), and bm::miniset< A, N >::~miniset().