dlvhex  2.5.0
bm::miniset< A, N > Class Template Reference

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_tm_buf
 Buffer pointer.
unsigned m_type
 buffer type (0-bit, 1-gap)

Detailed Description

template<class A, size_t N>
class bm::miniset< A, N >

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.

See also:
bvmini

Definition at line 58 of file bmvmin.h.


Constructor & Destructor Documentation

template<class A , size_t N>
bm::miniset< A, N >::miniset ( ) [inline]

Definition at line 62 of file bmvmin.h.

template<class A , size_t N>
bm::miniset< A, N >::miniset ( const miniset< A, N > &  mset) [inline]
template<class A , size_t N>
bm::miniset< A, N >::~miniset ( ) [inline]
template<class A , size_t N>
bm::miniset< A, N >::miniset ( ) [inline]

Definition at line 62 of file bmvmin.h.

template<class A , size_t N>
bm::miniset< A, N >::miniset ( const miniset< A, N > &  mset) [inline]
template<class A , size_t N>
bm::miniset< A, N >::~miniset ( ) [inline]

Member Function Documentation

template<class A , size_t N>
void bm::miniset< A, N >::convert_buf ( ) [inline, private]
template<class A , size_t N>
void bm::miniset< A, N >::convert_buf ( ) [inline, private]
template<class A , size_t N>
void bm::miniset< A, N >::init_bitbuf ( bm::word_t buf) [inline, private]
template<class A , size_t N>
void bm::miniset< A, N >::init_bitbuf ( bm::word_t buf) [inline, private]
template<class A , size_t N>
void bm::miniset< A, N >::init_gapbuf ( bm::word_t buf) [inline, private]
template<class A , size_t N>
void bm::miniset< A, N >::init_gapbuf ( bm::word_t buf) [inline, private]
template<class A , size_t N>
unsigned bm::miniset< A, N >::mem_used ( ) const [inline]
template<class A , size_t N>
unsigned bm::miniset< A, N >::mem_used ( ) const [inline]
template<class A , size_t N>
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.

template<class A , size_t N>
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.

template<class A , size_t N>
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.

template<class A , size_t N>
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.


Field Documentation


The documentation for this class was generated from the following files: