tesseract v5.3.3.20231005
tesseract::BestChoiceBundle Struct Reference

Bundle together all the things pertaining to the best choice/state. More...

#include <lm_state.h>

Public Member Functions

 BestChoiceBundle (int matrix_dimension)
 
 ~BestChoiceBundle ()
 

Public Attributes

bool updated
 Flag to indicate whether anything was changed. More...
 
DANGERR fixpt
 Places to try to fix the word suggested by ambiguity checking. More...
 
std::vector< LanguageModelState * > beam
 
ViterbiStateEntrybest_vse
 Best ViterbiStateEntry and BLOB_CHOICE. More...
 

Detailed Description

Bundle together all the things pertaining to the best choice/state.

Definition at line 226 of file lm_state.h.

Constructor & Destructor Documentation

◆ BestChoiceBundle()

tesseract::BestChoiceBundle::BestChoiceBundle ( int  matrix_dimension)
inlineexplicit

Definition at line 227 of file lm_state.h.

227 : updated(false), best_vse(nullptr) {
228 beam.reserve(matrix_dimension);
229 for (int i = 0; i < matrix_dimension; ++i) {
230 beam.push_back(new LanguageModelState);
231 }
232 }
std::vector< LanguageModelState * > beam
Definition: lm_state.h:246
ViterbiStateEntry * best_vse
Best ViterbiStateEntry and BLOB_CHOICE.
Definition: lm_state.h:248
bool updated
Flag to indicate whether anything was changed.
Definition: lm_state.h:240

◆ ~BestChoiceBundle()

tesseract::BestChoiceBundle::~BestChoiceBundle ( )
inline

Definition at line 233 of file lm_state.h.

233 {
234 for (auto &state : beam) {
235 delete state;
236 }
237 }

Member Data Documentation

◆ beam

std::vector<LanguageModelState *> tesseract::BestChoiceBundle::beam

The beam. One LanguageModelState containing a list of ViterbiStateEntry per row in the ratings matrix containing all VSEs whose BLOB_CHOICE is somewhere in the corresponding row.

Definition at line 246 of file lm_state.h.

◆ best_vse

ViterbiStateEntry* tesseract::BestChoiceBundle::best_vse

Best ViterbiStateEntry and BLOB_CHOICE.

Definition at line 248 of file lm_state.h.

◆ fixpt

DANGERR tesseract::BestChoiceBundle::fixpt

Places to try to fix the word suggested by ambiguity checking.

Definition at line 242 of file lm_state.h.

◆ updated

bool tesseract::BestChoiceBundle::updated

Flag to indicate whether anything was changed.

Definition at line 240 of file lm_state.h.


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