MCPcopy Create free account
hub / github.com/creatale/node-dv / Fits

Method Fits

deps/tesseract/ccmain/paragraphs.cpp:1239–1248  ·  view source on GitHub ↗

Examine rows[start, end) and try to determine if an existing non-centered paragraph model would fit them perfectly. If so, return a pointer to it. If not, return NULL.

Source from the content-addressed store, hash-verified

1237// paragraph model would fit them perfectly. If so, return a pointer to it.
1238// If not, return NULL.
1239const ParagraphModel *ParagraphTheory::Fits(
1240 const GenericVector<RowScratchRegisters> *rows, int start, int end) const {
1241 for (int m = 0; m < models_->size(); m++) {
1242 const ParagraphModel *model = (*models_)[m];
1243 if (model->justification() != JUSTIFICATION_CENTER &&
1244 RowsFitModel(rows, start, end, model))
1245 return model;
1246 }
1247 return NULL;
1248}
1249
1250void ParagraphTheory::NonCenteredModels(SetOfModels *models) {
1251 for (int m = 0; m < models_->size(); m++) {

Callers

nothing calls this directly

Calls 3

RowsFitModelFunction · 0.85
justificationMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected