Definition at line 24 of file indexmapbidi_test.cc.
◆ ComputePrimes()
void tesseract::IndexMapBiDiTest::ComputePrimes |
( |
IndexMapBiDi * |
map | ) |
|
|
inline |
Definition at line 36 of file indexmapbidi_test.cc.
43 int factor_limit =
static_cast<int>(sqrt(1.0 +
kPrimeLimit));
44 for (
int f = 3; f <= factor_limit; f += 2) {
45 if (map->SparseToCompact(f) >= 0) {
47 map->SetMap(f * m,
false);
◆ OutputNameToPath()
std::string tesseract::IndexMapBiDiTest::OutputNameToPath |
( |
const std::string & |
name | ) |
|
|
inline |
Definition at line 32 of file indexmapbidi_test.cc.
static std::string JoinPath(const std::string &s1, const std::string &s2)
◆ SetUp()
void tesseract::IndexMapBiDiTest::SetUp |
( |
| ) |
|
|
inlineoverrideprotected |
◆ TestPrimes()
void tesseract::IndexMapBiDiTest::TestPrimes |
( |
const IndexMap & |
map | ) |
|
|
inline |
Definition at line 54 of file indexmapbidi_test.cc.
58 EXPECT_EQ(167, map.SparseToCompact(997));
59 EXPECT_EQ(997, map.CompactToSparse(167));
61 EXPECT_EQ(-1, map.SparseToCompact(995));
62 EXPECT_EQ(-1, map.SparseToCompact(996));
63 EXPECT_EQ(-1, map.SparseToCompact(998));
64 EXPECT_EQ(-1, map.SparseToCompact(999));
66 EXPECT_EQ(991, map.CompactToSparse(166));
68 EXPECT_EQ(168, map.CompactSize());
The documentation for this class was generated from the following file: