#include <qrsequence.h>
Definition at line 31 of file qrsequence.h.
◆ QRSequenceGenerator()
QRSequenceGenerator::QRSequenceGenerator |
( |
int |
N | ) |
|
|
inlineexplicit |
Definition at line 34 of file qrsequence.h.
35 num_bits_ =
static_cast<int>(ceil(log(
static_cast<double>(N)) / log(2.0)));
36 }
◆ GetBinaryReversedInteger()
int QRSequenceGenerator::GetBinaryReversedInteger |
( |
int |
in_val | ) |
const |
|
inlineprotected |
Definition at line 60 of file qrsequence.h.
60 {
62 int out_val = 0;
63 while (bit_pos--) {
64
65 out_val |= (in_val & 0x1);
66 if (bit_pos > 0) {
67
68 out_val <<= 1;
69 }
70
71 in_val >>= 1;
72 }
73 return out_val;
74 }
◆ GetVal()
int QRSequenceGenerator::GetVal |
( |
| ) |
|
|
inline |
Definition at line 40 of file qrsequence.h.
40 {
41 const int kInvalidVal = -1;
42 const int kMaxNaturalNumberValue = 1 <<
num_bits_;
43 if (
next_num_ >= kMaxNaturalNumberValue) {
44 return kInvalidVal;
45 }
47
48 while (
next_num_ < kMaxNaturalNumberValue) {
51 break;
52 }
53 }
54 return (
next_num_ > kMaxNaturalNumberValue) ? kInvalidVal : n;
55 }
int GetBinaryReversedInteger(int in_val) const
◆ N_
int QRSequenceGenerator::N_ |
|
protected |
◆ next_num_
int QRSequenceGenerator::next_num_ |
|
protected |
◆ num_bits_
int QRSequenceGenerator::num_bits_ |
|
protected |
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccutil/qrsequence.h