dlvhex
2.5.0
|
Bitvector class with very limited functionality. More...
#include <vs10/bm/bmvmin.h>
Public Member Functions | |
bvector_mini (unsigned size) | |
bvector_mini (const bvector_mini &bvect) | |
~bvector_mini () | |
int | is_bit_true (unsigned pos) const |
Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. | |
void | set_bit (unsigned pos) |
Sets bit number pos to 1. | |
void | clear_bit (unsigned pos) |
Sets bit number pos to 0. | |
unsigned | bit_count () const |
Counts number of bits ON. | |
int | compare (const bvector_mini &bvect) |
Comparison. | |
unsigned | get_first () const |
Returns index of the first ON bit. | |
unsigned | get_next (unsigned idx) const |
Returns index of next bit, which is ON. | |
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) |
bvector_mini (unsigned size) | |
bvector_mini (const bvector_mini &bvect) | |
~bvector_mini () | |
int | is_bit_true (unsigned pos) const |
Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise. | |
void | set_bit (unsigned pos) |
Sets bit number pos to 1. | |
void | clear_bit (unsigned pos) |
Sets bit number pos to 0. | |
unsigned | bit_count () const |
Counts number of bits ON. | |
int | compare (const bvector_mini &bvect) |
Comparison. | |
unsigned | get_first () const |
Returns index of the first ON bit. | |
unsigned | get_next (unsigned idx) const |
Returns index of next bit, which is ON. | |
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) |
Private Attributes | |
bm::word_t * | m_buf |
unsigned | m_size |
Bitvector class with very limited functionality.
Class implements simple bitset and used for internal and testing purposes.
bm::bvector_mini< A >::bvector_mini | ( | unsigned | size | ) | [inline] |
Definition at line 281 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
Referenced by bm::bvector_mini< A >::mem_used().
bm::bvector_mini< A >::bvector_mini | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 289 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
bm::bvector_mini< A >::~bvector_mini | ( | ) | [inline] |
Definition at line 297 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
bm::bvector_mini< A >::bvector_mini | ( | unsigned | size | ) | [inline] |
Definition at line 281 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
bm::bvector_mini< A >::bvector_mini | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 289 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
bm::bvector_mini< A >::~bvector_mini | ( | ) | [inline] |
Definition at line 297 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
unsigned bm::bvector_mini< A >::bit_count | ( | ) | const [inline] |
Counts number of bits ON.
Definition at line 330 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by bm::bvector_mini< A >::compare().
unsigned bm::bvector_mini< A >::bit_count | ( | ) | const [inline] |
Counts number of bits ON.
Definition at line 330 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::clear_bit | ( | unsigned | pos | ) | [inline] |
Sets bit number pos to 0.
Definition at line 321 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
void bm::bvector_mini< A >::clear_bit | ( | unsigned | pos | ) | [inline] |
Sets bit number pos to 0.
Definition at line 321 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
void bm::bvector_mini< A >::combine_and | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 433 of file bmvmin.h.
References bm::bvector_mini< A >::get_buf(), bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_and | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 433 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_or | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 458 of file bmvmin.h.
References bm::bvector_mini< A >::get_buf(), bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_or | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 458 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_sub | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 470 of file bmvmin.h.
References bm::bvector_mini< A >::get_buf(), bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_sub | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 470 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_xor | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 445 of file bmvmin.h.
References bm::bvector_mini< A >::get_buf(), bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::combine_xor | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Definition at line 445 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
int bm::bvector_mini< A >::compare | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Comparison.
Definition at line 344 of file bmvmin.h.
References bm::bvector_mini< A >::bit_count(), bm::bvector_mini< A >::get_first(), and bm::bvector_mini< A >::get_next().
int bm::bvector_mini< A >::compare | ( | const bvector_mini< A > & | bvect | ) | [inline] |
Comparison.
Definition at line 344 of file bmvmin.h.
References bm::bvector_mini< A >::bit_count(), bm::bvector_mini< A >::get_first(), and bm::bvector_mini< A >::get_next().
const unsigned* bm::bvector_mini< A >::get_buf | ( | ) | const [inline] |
Definition at line 482 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
Referenced by bm::bvector_mini< A >::combine_and(), bm::bvector_mini< A >::combine_or(), bm::bvector_mini< A >::combine_sub(), and bm::bvector_mini< A >::combine_xor().
const unsigned* bm::bvector_mini< A >::get_buf | ( | ) | const [inline] |
Definition at line 482 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
unsigned bm::bvector_mini< A >::get_first | ( | ) | const [inline] |
Returns index of the first ON bit.
Definition at line 382 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by bm::bvector_mini< A >::compare().
unsigned bm::bvector_mini< A >::get_first | ( | ) | const [inline] |
Returns index of the first ON bit.
Definition at line 382 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
unsigned bm::bvector_mini< A >::get_next | ( | unsigned | idx | ) | const [inline] |
Returns index of next bit, which is ON.
Definition at line 408 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
unsigned bm::bvector_mini< A >::get_next | ( | unsigned | idx | ) | const [inline] |
Returns index of next bit, which is ON.
Definition at line 408 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by bm::bvector_mini< A >::compare().
int bm::bvector_mini< A >::is_bit_true | ( | unsigned | pos | ) | const [inline] |
Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.
Definition at line 303 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
int bm::bvector_mini< A >::is_bit_true | ( | unsigned | pos | ) | const [inline] |
Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.
Definition at line 303 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
unsigned bm::bvector_mini< A >::mem_used | ( | ) | const [inline] |
Definition at line 483 of file bmvmin.h.
References bm::bvector_mini< A >::bvector_mini(), and bm::bvector_mini< A >::m_size.
unsigned bm::bvector_mini< A >::mem_used | ( | ) | const [inline] |
Definition at line 483 of file bmvmin.h.
References bm::bvector_mini< A >::bvector_mini(), and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::set_bit | ( | unsigned | pos | ) | [inline] |
Sets bit number pos to 1.
Definition at line 312 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
void bm::bvector_mini< A >::set_bit | ( | unsigned | pos | ) | [inline] |
Sets bit number pos to 1.
Definition at line 312 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
void bm::bvector_mini< A >::swap | ( | bvector_mini< A > & | bvm | ) | [inline] |
Definition at line 488 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
void bm::bvector_mini< A >::swap | ( | bvector_mini< A > & | bvm | ) | [inline] |
Definition at line 488 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
bm::word_t * bm::bvector_mini< A >::m_buf [private] |
Definition at line 497 of file bmvmin.h.
Referenced by bm::bvector_mini< A >::bit_count(), bm::bvector_mini< A >::bvector_mini(), bm::bvector_mini< A >::clear_bit(), bm::bvector_mini< A >::combine_and(), bm::bvector_mini< A >::combine_or(), bm::bvector_mini< A >::combine_sub(), bm::bvector_mini< A >::combine_xor(), bm::bvector_mini< A >::get_buf(), bm::bvector_mini< A >::get_first(), bm::bvector_mini< A >::get_next(), bm::bvector_mini< A >::is_bit_true(), bm::bvector_mini< A >::set_bit(), bm::bvector_mini< A >::swap(), and bm::bvector_mini< A >::~bvector_mini().
unsigned bm::bvector_mini< A >::m_size [private] |
Definition at line 498 of file bmvmin.h.
Referenced by bm::bvector_mini< A >::bit_count(), bm::bvector_mini< A >::bvector_mini(), bm::bvector_mini< A >::combine_and(), bm::bvector_mini< A >::combine_or(), bm::bvector_mini< A >::combine_sub(), bm::bvector_mini< A >::combine_xor(), bm::bvector_mini< A >::get_first(), bm::bvector_mini< A >::get_next(), bm::bvector_mini< A >::mem_used(), bm::bvector_mini< A >::swap(), and bm::bvector_mini< A >::~bvector_mini().