|
Tesseract
3.02
|
#include <paragraphs_internal.h>
Public Member Functions | |
| ParagraphTheory (GenericVector< ParagraphModel * > *models) | |
| GenericVector< ParagraphModel * > & | models () |
| const GenericVector < ParagraphModel * > & | models () const |
| const ParagraphModel * | AddModel (const ParagraphModel &model) |
| void | DiscardUnusedModels (const SetOfModels &used_models) |
| void | NonCenteredModels (SetOfModels *models) |
| const ParagraphModel * | Fits (const GenericVector< RowScratchRegisters > *rows, int start, int end) const |
| int | IndexOf (const ParagraphModel *model) const |
Definition at line 189 of file paragraphs_internal.h.
| tesseract::ParagraphTheory::ParagraphTheory | ( | GenericVector< ParagraphModel * > * | models | ) | [inline, explicit] |
Definition at line 193 of file paragraphs_internal.h.
: models_(models) {}
| const ParagraphModel * tesseract::ParagraphTheory::AddModel | ( | const ParagraphModel & | model | ) |
Definition at line 1163 of file paragraphs.cpp.
{
for (int i = 0; i < models_->size(); i++) {
if ((*models_)[i]->Comparable(model))
return (*models_)[i];
}
ParagraphModel *m = new ParagraphModel(model);
models_->push_back(m);
models_we_added_.push_back_new(m);
return m;
}
| void tesseract::ParagraphTheory::DiscardUnusedModels | ( | const SetOfModels & | used_models | ) |
Definition at line 1174 of file paragraphs.cpp.
| const ParagraphModel * tesseract::ParagraphTheory::Fits | ( | const GenericVector< RowScratchRegisters > * | rows, |
| int | start, | ||
| int | end | ||
| ) | const |
Definition at line 1188 of file paragraphs.cpp.
{
for (int m = 0; m < models_->size(); m++) {
const ParagraphModel *model = (*models_)[m];
if (model->justification() != JUSTIFICATION_CENTER &&
RowsFitModel(rows, start, end, model))
return model;
}
return NULL;
}
| int tesseract::ParagraphTheory::IndexOf | ( | const ParagraphModel * | model | ) | const |
Definition at line 1207 of file paragraphs.cpp.
{
for (int i = 0; i < models_->size(); i++) {
if ((*models_)[i] == model)
return i;
}
return -1;
}
| GenericVector<ParagraphModel *>& tesseract::ParagraphTheory::models | ( | ) | [inline] |
Definition at line 195 of file paragraphs_internal.h.
{ return *models_; }
| const GenericVector<ParagraphModel *>& tesseract::ParagraphTheory::models | ( | ) | const [inline] |
Definition at line 196 of file paragraphs_internal.h.
{ return *models_; }
| void tesseract::ParagraphTheory::NonCenteredModels | ( | SetOfModels * | models | ) |
Definition at line 1199 of file paragraphs.cpp.
{
for (int m = 0; m < models_->size(); m++) {
const ParagraphModel *model = (*models_)[m];
if (model->justification() != JUSTIFICATION_CENTER)
models->push_back_new(model);
}
}