tesseract  4.00.00dev
ADAPT_RESULTS Struct Reference

Public Member Functions

void Initialize ()
 
void ComputeBest ()
 

Public Attributes

inT32 BlobLength
 
bool HasNonfragment
 
UNICHAR_ID best_unichar_id
 
int best_match_index
 
FLOAT32 best_rating
 
GenericVector< UnicharRatingmatch
 
GenericVector< CP_RESULT_STRUCTCPResults
 

Detailed Description

Definition at line 82 of file adaptmatch.cpp.

Member Function Documentation

◆ ComputeBest()

void ADAPT_RESULTS::ComputeBest ( )
inline

Definition at line 99 of file adaptmatch.cpp.

99  {
100  best_unichar_id = INVALID_UNICHAR_ID;
101  best_match_index = -1;
103  for (int i = 0; i < match.size(); ++i) {
104  if (match[i].rating > best_rating) {
105  best_rating = match[i].rating;
106  best_unichar_id = match[i].unichar_id;
107  best_match_index = i;
108  }
109  }
110  }
int best_match_index
Definition: adaptmatch.cpp:86
#define WORST_POSSIBLE_RATING
Definition: adaptmatch.cpp:77
int size() const
Definition: genericvector.h:72
GenericVector< UnicharRating > match
Definition: adaptmatch.cpp:88
UNICHAR_ID best_unichar_id
Definition: adaptmatch.cpp:85
FLOAT32 best_rating
Definition: adaptmatch.cpp:87

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

93  {
95  HasNonfragment = false;
96  ComputeBest();
97  }
inT32 BlobLength
Definition: adaptmatch.cpp:83
#define MAX_INT32
Definition: host.h:62
bool HasNonfragment
Definition: adaptmatch.cpp:84
void ComputeBest()
Definition: adaptmatch.cpp:99

Member Data Documentation

◆ best_match_index

int ADAPT_RESULTS::best_match_index

Definition at line 86 of file adaptmatch.cpp.

◆ best_rating

FLOAT32 ADAPT_RESULTS::best_rating

Definition at line 87 of file adaptmatch.cpp.

◆ best_unichar_id

UNICHAR_ID ADAPT_RESULTS::best_unichar_id

Definition at line 85 of file adaptmatch.cpp.

◆ BlobLength

inT32 ADAPT_RESULTS::BlobLength

Definition at line 83 of file adaptmatch.cpp.

◆ CPResults

GenericVector<CP_RESULT_STRUCT> ADAPT_RESULTS::CPResults

Definition at line 89 of file adaptmatch.cpp.

◆ HasNonfragment

bool ADAPT_RESULTS::HasNonfragment

Definition at line 84 of file adaptmatch.cpp.

◆ match

GenericVector<UnicharRating> ADAPT_RESULTS::match

Definition at line 88 of file adaptmatch.cpp.


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