tesseract 3.04.01

tesseract::ParagraphTheory Class Reference

#include <paragraphs_internal.h>

List of all members.

Public Member Functions

 ParagraphTheory (GenericVector< ParagraphModel * > *models)
GenericVector< ParagraphModel * > & models ()
const GenericVector
< ParagraphModel * > & 
models () const
const ParagraphModelAddModel (const ParagraphModel &model)
void DiscardUnusedModels (const SetOfModels &used_models)
void NonCenteredModels (SetOfModels *models)
const ParagraphModelFits (const GenericVector< RowScratchRegisters > *rows, int start, int end) const
int IndexOf (const ParagraphModel *model) const

Detailed Description

Definition at line 189 of file paragraphs_internal.h.


Constructor & Destructor Documentation

tesseract::ParagraphTheory::ParagraphTheory ( GenericVector< ParagraphModel * > *  models) [inline, explicit]

Definition at line 193 of file paragraphs_internal.h.

      : models_(models) {}

Member Function Documentation

const ParagraphModel * tesseract::ParagraphTheory::AddModel ( const ParagraphModel model)

Definition at line 1217 of file paragraphs.cpp.

                                                                        {
  for (int i = models_->size() - 1; i >= 0; i--) {
void tesseract::ParagraphTheory::DiscardUnusedModels ( const SetOfModels used_models)

Definition at line 1228 of file paragraphs.cpp.

                                                                  {
      models_->remove(i);
      models_we_added_.remove(models_we_added_.get_index(m));
      delete m;
    }
  }
}

// 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.
const ParagraphModel * tesseract::ParagraphTheory::Fits ( const GenericVector< RowScratchRegisters > *  rows,
int  start,
int  end 
) const

Definition at line 1242 of file paragraphs.cpp.

                                                           {
  for (int m = 0; m < models_->size(); m++) {
int tesseract::ParagraphTheory::IndexOf ( const ParagraphModel model) const

Definition at line 1261 of file paragraphs.cpp.

                                                          {
const GenericVector<ParagraphModel *>& tesseract::ParagraphTheory::models ( ) const [inline]

Definition at line 196 of file paragraphs_internal.h.

{ return *models_; }
GenericVector<ParagraphModel *>& tesseract::ParagraphTheory::models ( ) [inline]

Definition at line 195 of file paragraphs_internal.h.

{ return *models_; }
void tesseract::ParagraphTheory::NonCenteredModels ( SetOfModels models)

Definition at line 1253 of file paragraphs.cpp.

                                                              {
  for (int i = 0; i < models_->size(); i++) {

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines