NCBI C++ ToolKit
|
Search Toolkit Book for bm::bvector_mini
Bitvector class with very limited functionality. More...
#include <util/bitset/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) |
Private Attributes | |
bm::word_t * | m_buf |
size_type | m_size |
Bitvector class with very limited functionality.
Class implements simple bitset and used for internal and testing purposes.
typedef bm::id_t bm::bvector_mini< A >::size_type |
|
inline |
Definition at line 281 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and ncbi::grid::netcache::search::fields::size.
|
inline |
Definition at line 289 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
|
inline |
Definition at line 297 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
|
inline |
Counts number of bits ON.
Definition at line 327 of file bmvmin.h.
References count, bm::bvector_mini< A >::m_buf, bm::bvector_mini< A >::m_size, and rapidjson::value.
Referenced by CheckVectors(), bm::bvector_mini< A >::compare(), and OrOperationsTest().
|
inline |
Sets bit number pos to 0.
Definition at line 319 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and mask.
Referenced by BasicFunctionalityTest(), FillSetsIntervals(), GAPCheck(), MiniSetTest(), MutationTest(), and SimpleRandomFillTest().
|
inline |
Definition at line 416 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by AndOperationsTest(), GAPCheck(), MutationOperationsTest(), and StressTest().
|
inline |
Definition at line 436 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by GAPCheck(), OrOperationsTest(), SerializationTest(), and StressTest().
|
inline |
Definition at line 446 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by GAPCheck(), StressTest(), and SubOperationsTest().
|
inline |
Definition at line 426 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by StressTest(), and XorOperationsTest().
|
inline |
Comparison.
Definition at line 340 of file bmvmin.h.
References bm::bvector_mini< A >::bit_count(), bm::bvector_mini< A >::get_first(), bm::bvector< Alloc >::get_first(), bm::bvector_mini< A >::get_next(), bm::bvector< Alloc >::get_next(), and i.
Referenced by ComparisonTest(), and StressTest().
|
inline |
Definition at line 456 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
|
inline |
Returns index of the first ON bit.
Definition at line 371 of file bmvmin.h.
References i, bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.
Referenced by CheckVectors(), bm::bvector_mini< A >::compare(), and GetNextTest().
|
inline |
Returns index of next bit, which is ON.
Definition at line 394 of file bmvmin.h.
References i, bm::bvector_mini< A >::m_buf, bm::bvector_mini< A >::m_size, and mask.
Referenced by CheckVectors(), bm::bvector_mini< A >::compare(), and GetNextTest().
|
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, and mask.
Referenced by BasicFunctionalityTest(), CheckGAPMin(), CheckVectors(), DetailedCheckVectors(), GAPCheck(), and print_mv().
|
inline |
Definition at line 457 of file bmvmin.h.
References bm::bvector_mini< A >::m_size.
Referenced by MutationOperationsTest().
|
inline |
Sets bit number pos to 1.
Definition at line 311 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf, and mask.
Referenced by AndOperationsTest(), BasicFunctionalityTest(), ComparisonTest(), FillSets(), FillSetsIntervals(), FillSetsRandom(), FillSetsRandomOne(), FillSetsRegular(), GAPCheck(), GetNextTest(), MiniSetTest(), MutationOperationsTest(), MutationTest(), OrOperationsTest(), SerializationTest(), SimpleRandomFillTest(), SubOperationsTest(), and XorOperationsTest().
|
inline |
Definition at line 462 of file bmvmin.h.
References bm::bvector_mini< A >::m_buf.
|
private |
Definition at line 470 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().
|
private |
Definition at line 471 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(), and bm::bvector_mini< A >::~bvector_mini().