27 #ifndef TESSERACT_CCUTIL_QRSEQUENCE_H_ 28 #define TESSERACT_CCUTIL_QRSEQUENCE_H_ 36 num_bits_ =
static_cast<int>(ceil(log(static_cast<double>(N)) / log(2.0)));
42 const int kInvalidVal = -1;
43 const int kMaxNaturalNumberValue = 1 <<
num_bits_;
48 while (
next_num_ < kMaxNaturalNumberValue) {
52 return (
next_num_ > kMaxNaturalNumberValue) ? kInvalidVal : n;
63 out_val |= (in_val & 0x1);
80 #endif // TESSERACT_CCUTIL_QRSEQUENCE_H_
int GetBinaryReversedInteger(int in_val) const
QRSequenceGenerator(int N)