#include <tabvector.h>
Definition at line 71 of file tabvector.h.
◆ TabConstraint()
tesseract::TabConstraint::TabConstraint |
( |
| ) |
|
|
default |
◆ ApplyConstraints()
void tesseract::TabConstraint::ApplyConstraints |
( |
TabConstraint_LIST * |
constraints | ) |
|
|
static |
Definition at line 117 of file tabvector.cpp.
118 int y_min = -INT32_MAX;
119 int y_max = INT32_MAX;
120 GetConstraints(constraints, &y_min, &y_max);
121 int y = (y_min + y_max) / 2;
122 TabConstraint_IT it(constraints);
123 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
125 TabVector* v = constraint->vector_;
126 if (constraint->is_top_) {
128 v->set_top_constraints(
nullptr);
131 v->set_bottom_constraints(
nullptr);
◆ CompatibleConstraints()
bool tesseract::TabConstraint::CompatibleConstraints |
( |
TabConstraint_LIST * |
list1, |
|
|
TabConstraint_LIST * |
list2 |
|
) |
| |
|
static |
Definition at line 76 of file tabvector.cpp.
80 int y_min = -INT32_MAX;
81 int y_max = INT32_MAX;
83 tprintf(
"Testing constraint compatibility\n");
84 GetConstraints(list1, &y_min, &y_max);
85 GetConstraints(list2, &y_min, &y_max);
87 tprintf(
"Resulting range = [%d,%d]\n", y_min, y_max);
88 return y_max >= y_min;
int textord_debug_tabfind
DLLSYM void tprintf(const char *format,...)
◆ CreateConstraint()
void tesseract::TabConstraint::CreateConstraint |
( |
TabVector * |
vector, |
|
|
bool |
is_top |
|
) |
| |
|
static |
Definition at line 64 of file tabvector.cpp.
66 TabConstraint_LIST* constraints =
new TabConstraint_LIST;
67 TabConstraint_IT it(constraints);
68 it.add_to_end(constraint);
70 vector->set_top_constraints(constraints);
72 vector->set_bottom_constraints(constraints);
◆ MergeConstraints()
void tesseract::TabConstraint::MergeConstraints |
( |
TabConstraint_LIST * |
list1, |
|
|
TabConstraint_LIST * |
list2 |
|
) |
| |
|
static |
Definition at line 93 of file tabvector.cpp.
97 TabConstraint_IT it(list2);
99 tprintf(
"Merging constraints\n");
101 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
104 constraint->vector_->Print(
"Merge");
105 if (constraint->is_top_)
106 constraint->vector_->set_top_constraints(list1);
108 constraint->vector_->set_bottom_constraints(list1);
111 it.add_list_before(list2);
int textord_debug_tabfind
DLLSYM void tprintf(const char *format,...)
The documentation for this class was generated from the following files: