bm::bvector_mini< A > Class Template Reference

Search Toolkit Book for bm::bvector_mini

#include <bmvmin.h>

List of all members.


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 273 of file 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)

Private Attributes

bm::word_tm_buf
unsigned m_size


Constructor & Destructor Documentation

template<class A>
bm::bvector_mini< A >::bvector_mini unsigned  size  )  [inline]
 

Definition at line 276 of file bmvmin.h.

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

Definition at line 284 of file bmvmin.h.

template<class A>
bm::bvector_mini< A >::~bvector_mini  )  [inline]
 

Definition at line 292 of file bmvmin.h.


Member Function Documentation

template<class A>
unsigned bm::bvector_mini< A >::bit_count  )  const [inline]
 

Counts number of bits ON.

Definition at line 325 of file bmvmin.h.

Referenced by CheckVectors().

template<class A>
void bm::bvector_mini< A >::clear_bit unsigned  pos  )  [inline]
 

Sets bit number pos to 0.

Definition at line 316 of file bmvmin.h.

References mask.

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

Definition at line 428 of file bmvmin.h.

Referenced by AndOperationsTest().

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

Definition at line 453 of file bmvmin.h.

Referenced by OrOperationsTest().

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

Definition at line 465 of file bmvmin.h.

Referenced by SubOperationsTest().

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

Definition at line 440 of file bmvmin.h.

Referenced by XorOperationsTest().

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

Comparison.

Definition at line 339 of file bmvmin.h.

References bm::bvector< Alloc, MS >::get_first().

Referenced by ComparisonTest().

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

Definition at line 477 of file bmvmin.h.

template<class A>
unsigned bm::bvector_mini< A >::get_first  )  const [inline]
 

Returns index of the first ON bit.

Definition at line 377 of file bmvmin.h.

References pos.

Referenced by CheckVectors(), and GetNextTest().

template<class A>
unsigned bm::bvector_mini< A >::get_next unsigned  idx  )  const [inline]
 

Returns index of next bit, which is ON.

Definition at line 403 of file bmvmin.h.

References mask.

Referenced by CheckVectors(), and GetNextTest().

template<class A>
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 298 of file bmvmin.h.

References mask.

Referenced by CheckGAPMin(), CheckVectors(), DetailedCheckVectors(), and print_mv().

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

Definition at line 478 of file bmvmin.h.

template<class A>
void bm::bvector_mini< A >::set_bit unsigned  pos  )  [inline]
 

Sets bit number pos to 1.

Definition at line 307 of file bmvmin.h.

References mask.

Referenced by AndOperationsTest(), BasicFunctionalityTest(), ComparisonTest(), FillSets(), FillSetsIntervals(), GAPCheck(), GetNextTest(), MiniSetTest(), MutationOperationsTest(), MutationTest(), OrOperationsTest(), SerializationTest(), SimpleRandomFillTest(), SubOperationsTest(), and XorOperationsTest().

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

Definition at line 483 of file bmvmin.h.

References BM_ASSERT, bm::bvector_mini< A >::m_buf, and bm::bvector_mini< A >::m_size.


Member Data Documentation

template<class A>
bm::word_t* bm::bvector_mini< A >::m_buf [private]
 

Definition at line 492 of file bmvmin.h.

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

template<class A>
unsigned bm::bvector_mini< A >::m_size [private]
 

Definition at line 493 of file bmvmin.h.

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


The documentation for this class was generated from the following file:
Generated on Wed Dec 9 08:16:17 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:20:18 2009 by modify_doxy.py rev. 173732