tesseract  4.0.0-1-g2a2b
ADAPT_RESULTS Struct Reference

Public Member Functions

void Initialize ()
 
void ComputeBest ()
 

Public Attributes

int32_t BlobLength
 
bool HasNonfragment
 
UNICHAR_ID best_unichar_id
 
int best_match_index
 
float best_rating
 
GenericVector< UnicharRatingmatch
 
GenericVector< CP_RESULT_STRUCTCPResults
 

Detailed Description

Definition at line 92 of file adaptmatch.cpp.

Member Function Documentation

◆ ComputeBest()

void ADAPT_RESULTS::ComputeBest ( )
inline

Definition at line 109 of file adaptmatch.cpp.

109  {
110  best_unichar_id = INVALID_UNICHAR_ID;
111  best_match_index = -1;
113  for (int i = 0; i < match.size(); ++i) {
114  if (match[i].rating > best_rating) {
115  best_rating = match[i].rating;
116  best_unichar_id = match[i].unichar_id;
117  best_match_index = i;
118  }
119  }
120  }
int size() const
Definition: genericvector.h:71
UNICHAR_ID best_unichar_id
Definition: adaptmatch.cpp:95
#define WORST_POSSIBLE_RATING
Definition: adaptmatch.cpp:87
GenericVector< UnicharRating > match
Definition: adaptmatch.cpp:98
int best_match_index
Definition: adaptmatch.cpp:96
float best_rating
Definition: adaptmatch.cpp:97

◆ Initialize()

void ADAPT_RESULTS::Initialize ( )
inline

Initializes data members to the default values. Sets the initial rating of each class to be the worst possible rating (1.0).

Definition at line 103 of file adaptmatch.cpp.

103  {
104  BlobLength = INT32_MAX;
105  HasNonfragment = false;
106  ComputeBest();
107  }
int32_t BlobLength
Definition: adaptmatch.cpp:93
bool HasNonfragment
Definition: adaptmatch.cpp:94
void ComputeBest()
Definition: adaptmatch.cpp:109

Member Data Documentation

◆ best_match_index

int ADAPT_RESULTS::best_match_index

Definition at line 96 of file adaptmatch.cpp.

◆ best_rating

float ADAPT_RESULTS::best_rating

Definition at line 97 of file adaptmatch.cpp.

◆ best_unichar_id

UNICHAR_ID ADAPT_RESULTS::best_unichar_id

Definition at line 95 of file adaptmatch.cpp.

◆ BlobLength

int32_t ADAPT_RESULTS::BlobLength

Definition at line 93 of file adaptmatch.cpp.

◆ CPResults

GenericVector<CP_RESULT_STRUCT> ADAPT_RESULTS::CPResults

Definition at line 99 of file adaptmatch.cpp.

◆ HasNonfragment

bool ADAPT_RESULTS::HasNonfragment

Definition at line 94 of file adaptmatch.cpp.

◆ match

GenericVector<UnicharRating> ADAPT_RESULTS::match

Definition at line 98 of file adaptmatch.cpp.


The documentation for this struct was generated from the following file: