#include <tabvector.h>
Definition at line 69 of file tabvector.h.
◆ TabConstraint()
tesseract::TabConstraint::TabConstraint |
( |
| ) |
|
|
inline |
◆ ApplyConstraints()
void tesseract::TabConstraint::ApplyConstraints |
( |
TabConstraint_LIST * |
constraints | ) |
|
|
static |
Definition at line 119 of file tabvector.cpp.
122 GetConstraints(constraints, &y_min, &y_max);
123 int y = (y_min + y_max) / 2;
124 TabConstraint_IT it(constraints);
125 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
127 TabVector* v = constraint->vector_;
128 if (constraint->is_top_) {
130 v->set_top_constraints(NULL);
133 v->set_bottom_constraints(NULL);
◆ CompatibleConstraints()
bool tesseract::TabConstraint::CompatibleConstraints |
( |
TabConstraint_LIST * |
list1, |
|
|
TabConstraint_LIST * |
list2 |
|
) |
| |
|
static |
Definition at line 78 of file tabvector.cpp.
85 tprintf(
"Testing constraint compatibility\n");
86 GetConstraints(list1, &y_min, &y_max);
87 GetConstraints(list2, &y_min, &y_max);
89 tprintf(
"Resulting range = [%d,%d]\n", y_min, y_max);
90 return y_max >= y_min;
int textord_debug_tabfind
◆ CreateConstraint()
void tesseract::TabConstraint::CreateConstraint |
( |
TabVector * |
vector, |
|
|
bool |
is_top |
|
) |
| |
|
static |
Definition at line 66 of file tabvector.cpp.
68 TabConstraint_LIST* constraints =
new TabConstraint_LIST;
69 TabConstraint_IT it(constraints);
70 it.add_to_end(constraint);
72 vector->set_top_constraints(constraints);
74 vector->set_bottom_constraints(constraints);
◆ MergeConstraints()
void tesseract::TabConstraint::MergeConstraints |
( |
TabConstraint_LIST * |
list1, |
|
|
TabConstraint_LIST * |
list2 |
|
) |
| |
|
static |
Definition at line 95 of file tabvector.cpp.
99 TabConstraint_IT it(list2);
101 tprintf(
"Merging constraints\n");
103 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
106 constraint->vector_->Print(
"Merge");
107 if (constraint->is_top_)
108 constraint->vector_->set_top_constraints(list1);
110 constraint->vector_->set_bottom_constraints(list1);
113 it.add_list_before(list2);
int textord_debug_tabfind
The documentation for this class was generated from the following files: