BitMagic-C++
Public Types | Public Member Functions
bm::bvector_mini< A > Class Template Reference

Bitvector class with very limited functionality. More...

#include <bmvmin.h>

Public Types

typedef bm::id_t size_type
 

Public Member Functions

 bvector_mini (size_type size)
 
 bvector_mini (const bvector_mini &bvect)
 
 ~bvector_mini ()
 
int is_bit_true (size_type pos) const
 Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. More...
 
void set_bit (size_type pos)
 Sets bit number pos to 1. More...
 
void clear_bit (size_type pos)
 Sets bit number pos to 0. More...
 
size_type bit_count () const
 Counts number of bits ON. More...
 
int compare (const bvector_mini &bvect)
 Comparison. More...
 
size_type get_first () const
 Returns index of the first ON bit. More...
 
size_type get_next (size_type idx) const
 Returns index of next bit, which is ON. More...
 
void combine_and (const bvector_mini &bvect)
 
void combine_xor (const bvector_mini &bvect)
 
void combine_or (const bvector_mini &bvect)
 
void combine_sub (const bvector_mini &bvect)
 
const unsigned * get_buf () const
 
unsigned mem_used () const
 
void swap (bvector_mini &bvm)
 

Detailed Description

template<class A>
class bm::bvector_mini< A >

Bitvector class with very limited functionality.

Class implements simple bitset and used for internal and testing purposes.

Definition at line 286 of file bmvmin.h.

Member Typedef Documentation

◆ size_type

template<class A >
typedef bm::id_t bm::bvector_mini< A >::size_type

Definition at line 292 of file bmvmin.h.

Constructor & Destructor Documentation

◆ bvector_mini() [1/2]

template<class A >
bm::bvector_mini< A >::bvector_mini ( size_type  size)
inline

Definition at line 296 of file bmvmin.h.

◆ bvector_mini() [2/2]

template<class A >
bm::bvector_mini< A >::bvector_mini ( const bvector_mini< A > &  bvect)
inline

Definition at line 304 of file bmvmin.h.

◆ ~bvector_mini()

template<class A >
bm::bvector_mini< A >::~bvector_mini ( )
inline

Definition at line 312 of file bmvmin.h.

Member Function Documentation

◆ bit_count()

template<class A >
size_type bm::bvector_mini< A >::bit_count ( ) const
inline

Counts number of bits ON.

Definition at line 342 of file bmvmin.h.

Referenced by bm::bvector_mini< A >::compare().

◆ clear_bit()

template<class A >
void bm::bvector_mini< A >::clear_bit ( size_type  pos)
inline

Sets bit number pos to 0.

Definition at line 334 of file bmvmin.h.

◆ combine_and()

template<class A >
void bm::bvector_mini< A >::combine_and ( const bvector_mini< A > &  bvect)
inline

Definition at line 431 of file bmvmin.h.

◆ combine_or()

template<class A >
void bm::bvector_mini< A >::combine_or ( const bvector_mini< A > &  bvect)
inline

Definition at line 451 of file bmvmin.h.

◆ combine_sub()

template<class A >
void bm::bvector_mini< A >::combine_sub ( const bvector_mini< A > &  bvect)
inline

Definition at line 461 of file bmvmin.h.

◆ combine_xor()

template<class A >
void bm::bvector_mini< A >::combine_xor ( const bvector_mini< A > &  bvect)
inline

Definition at line 441 of file bmvmin.h.

◆ compare()

template<class A >
int bm::bvector_mini< A >::compare ( const bvector_mini< A > &  bvect)
inline

◆ get_buf()

template<class A >
const unsigned* bm::bvector_mini< A >::get_buf ( ) const
inline

Definition at line 471 of file bmvmin.h.

◆ get_first()

template<class A >
size_type bm::bvector_mini< A >::get_first ( ) const
inline

Returns index of the first ON bit.

Definition at line 386 of file bmvmin.h.

Referenced by bm::bvector_mini< A >::compare().

◆ get_next()

template<class A >
size_type bm::bvector_mini< A >::get_next ( size_type  idx) const
inline

Returns index of next bit, which is ON.

Definition at line 409 of file bmvmin.h.

Referenced by bm::bvector_mini< A >::compare().

◆ is_bit_true()

template<class A >
int bm::bvector_mini< A >::is_bit_true ( size_type  pos) const
inline

Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.

Definition at line 318 of file bmvmin.h.

◆ mem_used()

template<class A >
unsigned bm::bvector_mini< A >::mem_used ( ) const
inline

Definition at line 472 of file bmvmin.h.

◆ set_bit()

template<class A >
void bm::bvector_mini< A >::set_bit ( size_type  pos)
inline

Sets bit number pos to 1.

Definition at line 326 of file bmvmin.h.

◆ swap()

template<class A >
void bm::bvector_mini< A >::swap ( bvector_mini< A > &  bvm)
inline

Definition at line 477 of file bmvmin.h.


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