Go to the source code of this file.
◆ fixspace_dbg()
Definition at line 825 of file fixspace.cpp.
827 const bool show_map_detail =
false;
832 tprintf(
"Blob count: %d (word); %d/%d (rebuild word)\n",
838 if (show_map_detail) {
847 tprintf(
"Done flag: %s\n\n", word->
done ?
"TRUE" :
"FALSE");
const char * string() const
void full_print(FILE *fp)
TBOX bounding_box() const
DLLSYM void tprintf(const char *format,...)
C_BLOB_LIST * cblob_list()
const STRING & unichar_string() const
WERD_CHOICE * best_choice
tesseract::BoxWord * box_word
◆ initialise_search()
void initialise_search |
( |
WERD_RES_LIST & |
src_list, |
|
|
WERD_RES_LIST & |
new_list |
|
) |
| |
Definition at line 207 of file fixspace.cpp.
208 WERD_RES_IT src_it(&src_list);
209 WERD_RES_IT new_it(&new_list);
213 for (src_it.mark_cycle_pt(); !src_it.cycled_list(); src_it.forward()) {
214 src_wd = src_it.data();
219 new_it.add_after_then_move(new_wd);
static WERD_RES * deep_copy(const WERD_RES *src)
◆ transform_to_next_perm()
void transform_to_next_perm |
( |
WERD_RES_LIST & |
words | ) |
|
Definition at line 402 of file fixspace.cpp.
403 WERD_RES_IT word_it(&words);
404 WERD_RES_IT prev_word_it(&words);
409 int16_t prev_right = -INT16_MAX;
412 int16_t min_gap = INT16_MAX;
414 for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
415 word = word_it.data();
418 if (prev_right > -INT16_MAX) {
419 gap = box.
left() - prev_right;
423 prev_right = box.
right();
426 if (min_gap < INT16_MAX) {
427 prev_right = -INT16_MAX;
428 word_it.set_to_list(&words);
430 for (; (prev_right == -INT16_MAX) || !word_it.at_first();
432 word = word_it.data();
435 if (prev_right > -INT16_MAX) {
436 gap = box.
left() - prev_right;
437 if (gap <= min_gap) {
438 prev_word = prev_word_it.data();
444 copy_word =
new WERD;
445 *copy_word = *(prev_word->
word);
451 prev_word_it.add_before_then_move(combo);
458 delete word_it.extract();
467 prev_word_it = word_it;
470 prev_right = box.
right();
TBOX bounding_box() const
void set_flag(WERD_FLAGS mask, bool value)
bool flag(WERD_FLAGS mask) const
void copy_on(WERD_RES *word_res)
void join_on(WERD *other)