#include <bitvector.h>
Public Member Functions | |
BitVector () | |
BitVector (int length) | |
BitVector (const BitVector &src) | |
BitVector & | operator= (const BitVector &src) |
~BitVector () | |
void | Init (int length) |
int | size () const |
bool | Serialize (FILE *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
void | SetAllFalse () |
void | SetAllTrue () |
void | SetBit (int index) |
void | ResetBit (int index) |
void | SetValue (int index, bool value) |
bool | At (int index) const |
bool | operator[] (int index) const |
int | NextSetBit (int prev_bit) const |
int | NumSetBits () const |
void | operator|= (const BitVector &other) |
void | operator &= (const BitVector &other) |
void | operator^= (const BitVector &other) |
void | SetSubtract (const BitVector &v1, const BitVector &v2) |
Static Public Attributes | |
static const uint8_t | lsb_index_ [256] |
static const uint8_t | lsb_eroded_ [256] |
static const int | hamming_table_ [256] |
Private Member Functions | |
void | Alloc (int length) |
int | WordIndex (int index) const |
uint32_t | BitMask (int index) const |
int | WordLength () const |
int | ByteLength () const |
Private Attributes | |
int32_t | bit_size_ |
uint32_t * | array_ |
Static Private Attributes | |
static const int | kBitFactor = sizeof(uint32_t) * 8 |
tesseract::BitVector::BitVector | ( | ) |
|
explicit |
tesseract::BitVector::BitVector | ( | const BitVector & | src | ) |
tesseract::BitVector::~BitVector | ( | ) |
|
private |
|
inline |
|
inlineprivate |
|
inlineprivate |
bool tesseract::BitVector::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
void tesseract::BitVector::Init | ( | int | length | ) |
int tesseract::BitVector::NextSetBit | ( | int | prev_bit | ) | const |
int tesseract::BitVector::NumSetBits | ( | ) | const |
void tesseract::BitVector::operator&= | ( | const BitVector & | other | ) |
|
inline |
void tesseract::BitVector::operator^= | ( | const BitVector & | other | ) |
void tesseract::BitVector::operator|= | ( | const BitVector & | other | ) |
|
inline |
bool tesseract::BitVector::Serialize | ( | FILE * | fp | ) | const |
void tesseract::BitVector::SetAllFalse | ( | ) |
void tesseract::BitVector::SetAllTrue | ( | ) |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
static |
|
staticprivate |
|
static |
|
static |