#include <workingpartset.h>
Definition at line 32 of file workingpartset.h.
◆ WorkingPartSet()
tesseract::WorkingPartSet::WorkingPartSet |
( |
ColPartition * |
column | ) |
|
|
inlineexplicit |
Definition at line 34 of file workingpartset.h.
35 : column_(
column), latest_part_(
nullptr), part_it_(&part_set_) {}
ColPartition * column() const
◆ AddPartition()
void tesseract::WorkingPartSet::AddPartition |
( |
ColPartition * |
part | ) |
|
Definition at line 29 of file workingpartset.cpp.
29 {
30 ColPartition *partner = part->SingletonPartner(true);
31 if (partner != nullptr) {
32 ASSERT_HOST(partner->SingletonPartner(
false) == part);
33 }
34 if (latest_part_ == nullptr || partner == nullptr) {
35
36 part_it_.move_to_last();
38
39 for (part_it_.move_to_first(); !part_it_.at_last() && part_it_.data() != partner;
40 part_it_.forward()) {
41 ;
42 }
43 }
44 part_it_.add_after_then_move(part);
45 latest_part_ = part;
46}
ColPartition * SingletonPartner(bool upper)
◆ column()
◆ ExtractCompletedBlocks()
void tesseract::WorkingPartSet::ExtractCompletedBlocks |
( |
const ICOORD & |
bleft, |
|
|
const ICOORD & |
tright, |
|
|
int |
resolution, |
|
|
ColPartition_LIST * |
used_parts, |
|
|
BLOCK_LIST * |
blocks, |
|
|
TO_BLOCK_LIST * |
to_blocks |
|
) |
| |
Definition at line 54 of file workingpartset.cpp.
56 {
57 MakeBlocks(bleft, tright, resolution, used_parts);
58 BLOCK_IT block_it(blocks);
59 block_it.move_to_last();
60 block_it.add_list_after(&completed_blocks_);
61 TO_BLOCK_IT to_block_it(to_blocks);
62 to_block_it.move_to_last();
63 to_block_it.add_list_after(&to_blocks_);
64}
◆ InsertCompletedBlocks()
void tesseract::WorkingPartSet::InsertCompletedBlocks |
( |
BLOCK_LIST * |
blocks, |
|
|
TO_BLOCK_LIST * |
to_blocks |
|
) |
| |
Definition at line 68 of file workingpartset.cpp.
68 {
69 BLOCK_IT block_it(&completed_blocks_);
70 block_it.add_list_before(blocks);
71 TO_BLOCK_IT to_block_it(&to_blocks_);
72 to_block_it.add_list_before(to_blocks);
73}
◆ set_column()
void tesseract::WorkingPartSet::set_column |
( |
ColPartition * |
col | ) |
|
|
inline |
The documentation for this class was generated from the following files: