22 #ifndef TESSERACT_CCUTIL_BITVECTOR_H_ 23 #define TESSERACT_CCUTIL_BITVECTOR_H_ 53 void Init(
int length);
84 bool At(
int index)
const {
108 void Alloc(
int length);
142 #endif // TESSERACT_CCUTIL_BITVECTOR_H_ static const int hamming_table_[256]
Definition: bitvector.h:43
bool DeSerialize(bool swap, FILE *fp)
Definition: bitvector.cpp:147
void operator|=(const BitVector &other)
Definition: bitvector.cpp:225
void Alloc(int length)
Definition: bitvector.cpp:254
void SetValue(int index, bool value)
Definition: bitvector.h:78
uint32_t BitMask(int index) const
Definition: bitvector.h:117
static const uint8_t lsb_eroded_[256]
Definition: bitvector.h:41
void SetSubtract(const BitVector &v1, const BitVector &v2)
Definition: bitvector.cpp:243
void operator^=(const BitVector &other)
Definition: bitvector.cpp:237
void SetAllFalse()
Definition: bitvector.cpp:163
int32_t bit_size_
Definition: bitvector.h:131
int WordLength() const
Definition: bitvector.h:122
Definition: baseapi.cpp:94
int ByteLength() const
Definition: bitvector.h:126
bool Serialize(FILE *fp) const
Definition: bitvector.cpp:139
int WordIndex(int index) const
Definition: bitvector.h:112
void Init(int length)
Definition: bitvector.cpp:133
static const uint8_t lsb_index_[256]
Definition: bitvector.h:38
uint32_t * array_
Definition: bitvector.h:135
bool operator[](int index) const
Definition: bitvector.h:87
Definition: bitvector.h:33
void SetAllTrue()
Definition: bitvector.cpp:166
bool At(int index) const
Definition: bitvector.h:84
int size() const
Definition: bitvector.h:56
BitVector & operator=(const BitVector &src)
Definition: bitvector.cpp:122
int NumSetBits() const
Definition: bitvector.cpp:210
static const int kBitFactor
Definition: bitvector.h:137
void SetBit(int index)
Definition: bitvector.h:72
void ResetBit(int index)
Definition: bitvector.h:75
int NextSetBit(int prev_bit) const
Definition: bitvector.cpp:172
BitVector()
Definition: bitvector.cpp:110
~BitVector()
Definition: bitvector.cpp:128
void operator &=(const BitVector &other)