tesseract  5.0.0-alpha-619-ge9db
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 91 of file adaptmatch.cpp.

Member Function Documentation

◆ ComputeBest()

void ADAPT_RESULTS::ComputeBest ( )
inline

Definition at line 108 of file adaptmatch.cpp.

108  {
109  best_unichar_id = INVALID_UNICHAR_ID;
110  best_match_index = -1;
112  for (int i = 0; i < match.size(); ++i) {
113  if (match[i].rating > best_rating) {
114  best_rating = match[i].rating;
115  best_unichar_id = match[i].unichar_id;
116  best_match_index = i;
117  }
118  }
119  }

◆ 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 102 of file adaptmatch.cpp.

102  {
103  BlobLength = INT32_MAX;
104  HasNonfragment = false;
105  ComputeBest();
106  }

Member Data Documentation

◆ best_match_index

int ADAPT_RESULTS::best_match_index

Definition at line 95 of file adaptmatch.cpp.

◆ best_rating

float ADAPT_RESULTS::best_rating

Definition at line 96 of file adaptmatch.cpp.

◆ best_unichar_id

UNICHAR_ID ADAPT_RESULTS::best_unichar_id

Definition at line 94 of file adaptmatch.cpp.

◆ BlobLength

int32_t ADAPT_RESULTS::BlobLength

Definition at line 92 of file adaptmatch.cpp.

◆ CPResults

GenericVector<CP_RESULT_STRUCT> ADAPT_RESULTS::CPResults

Definition at line 98 of file adaptmatch.cpp.

◆ HasNonfragment

bool ADAPT_RESULTS::HasNonfragment

Definition at line 93 of file adaptmatch.cpp.

◆ match

GenericVector<UnicharRating> ADAPT_RESULTS::match

Definition at line 97 of file adaptmatch.cpp.


The documentation for this struct was generated from the following file:
ADAPT_RESULTS::ComputeBest
void ComputeBest()
Definition: adaptmatch.cpp:108
ADAPT_RESULTS::best_rating
float best_rating
Definition: adaptmatch.cpp:96
WORST_POSSIBLE_RATING
#define WORST_POSSIBLE_RATING
Definition: adaptmatch.cpp:86
ADAPT_RESULTS::best_match_index
int best_match_index
Definition: adaptmatch.cpp:95
ADAPT_RESULTS::best_unichar_id
UNICHAR_ID best_unichar_id
Definition: adaptmatch.cpp:94
ADAPT_RESULTS::HasNonfragment
bool HasNonfragment
Definition: adaptmatch.cpp:93
ADAPT_RESULTS::match
GenericVector< UnicharRating > match
Definition: adaptmatch.cpp:97
ADAPT_RESULTS::BlobLength
int32_t BlobLength
Definition: adaptmatch.cpp:92
GenericVector::size
int size() const
Definition: genericvector.h:71