tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
27 class IndexMapBiDiTest :
public testing::Test {
30 std::locale::global(std::locale(
""));
43 int factor_limit = static_cast<int>(sqrt(1.0 +
kPrimeLimit));
44 for (
int f = 3; f <= factor_limit; f += 2) {
52 void TestPrimes(
const IndexMap& map) {
72 TEST_F(IndexMapBiDiTest, Primes) {
85 std::string filename = OutputNameToPath(
"primesmap");
86 FILE* fp = fopen(filename.c_str(),
"wb");
90 fp = fopen(filename.c_str(),
"rb");
99 TEST_F(IndexMapBiDiTest, ManyToOne) {
static std::string JoinPath(const std::string &s1, const std::string &s2)
int SparseToCompact(int sparse_index) const override
TEST_F(EquationFinderTest, IdentifySpecialText)
int CompactToSparse(int compact_index) const
virtual int SparseToCompact(int sparse_index) const
bool Serialize(FILE *fp) const
bool DeSerialize(bool swap, FILE *fp)
bool Merge(int compact_index1, int compact_index2)
const char * FLAGS_test_tmpdir
void CopyFrom(const IndexMap &src)
void CopyFrom(const IndexMapBiDi &src)
virtual int SparseSize() const
int SparseSize() const override
void Init(int size, bool all_mapped)
void SetMap(int sparse_index, bool mapped)