Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
MATRIX Class Reference

`#include <matrix.h>`

Inheritance diagram for MATRIX:

List of all members.

## Public Member Functions
| MATRIX (int dimension)
void | print (const UNICHARSET &unicharset) const
Public Member Functions inherited from GENERIC_MATRIX< BLOB_CHOICE_LIST * >
| GENERIC_MATRIX (int dimension, const BLOB_CHOICE_LIST *&empty)
int | dimension () const
Public Member Functions inherited from GENERIC_2D_ARRAY< BLOB_CHOICE_LIST * >
| GENERIC_2D_ARRAY (int dim1, int dim2, const BLOB_CHOICE_LIST *&empty)
| ~GENERIC_2D_ARRAY ()
bool | Serialize (FILE *fp) const
bool | DeSerialize (bool swap, FILE *fp)
bool | SerializeClasses (FILE *fp) const
bool | DeSerializeClasses (bool swap, FILE *fp)
int | dim1 () const
int | dim2 () const
int | index (int column, int row) const
void | put (int column, int row, const BLOB_CHOICE_LIST *&thing)
BLOB_CHOICE_LIST * | get (int column, int row) const
const BLOB_CHOICE_LIST *& | operator() (int column, int row) const
BLOB_CHOICE_LIST *& | operator() (int column, int row)
BLOB_CHOICE_LIST ** | operator[] (int column)
void | delete_matrix_pointers ()

## Detailed Description

Definition at line 193 of file matrix.h.

## Constructor & Destructor Documentation

MATRIX::MATRIX | ( | int | dimension | ) |
| inline

Definition at line 195 of file matrix.h.

: GENERIC_MATRIX<BLOB_CHOICE_LIST *>(dimension,
NOT_CLASSIFIED) {}

## Member Function Documentation

void MATRIX::print | ( | const UNICHARSET & | unicharset | ) | const

Definition at line 36 of file matrix.cpp.

{
tprintf("Ratings Matrix (top choices)\n");
int row, col;
for (col = 0; col < this->dimension(); ++col) tprintf("\t%d", col);
tprintf("\n");
for (row = 0; row < this->dimension(); ++row) {
for (col = 0; col <= row; ++col) {
if (col == 0) tprintf("%d\t", row);
BLOB_CHOICE_LIST *rating = this->get(col, row);
if (rating != NOT_CLASSIFIED) {
BLOB_CHOICE_IT b_it(rating);
int counter = 0;
for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
tprintf("%s ", unicharset.id_to_unichar(b_it.data()->unichar_id()));
++counter;
if (counter == 3) break;
}
tprintf("\t");
} else {
tprintf(" \t");
}
}
tprintf("\n");
}
}

The documentation for this class was generated from the following files:

- /mnt/data/src/tesseract-ocr/ccstruct/matrix.h
- /mnt/data/src/tesseract-ocr/ccstruct/matrix.cpp