MCPcopy Create free account
hub / github.com/creatale/node-dv / AddPartner

Method AddPartner

deps/tesseract/textord/tabvector.cpp:492–502  ·  view source on GitHub ↗

Add a new element to the list of partner TabVectors. Partners must be added in order of increasing y coordinate of the text line that makes them partners. Groups of identical partners are merged into one.

Source from the content-addressed store, hash-verified

490// that makes them partners.
491// Groups of identical partners are merged into one.
492void TabVector::AddPartner(TabVector* partner) {
493 if (IsSeparator() || partner->IsSeparator())
494 return;
495 TabVector_C_IT it(&partners_);
496 if (!it.empty()) {
497 it.move_to_last();
498 if (it.data() == partner)
499 return;
500 }
501 it.add_after_then_move(partner);
502}
503
504// Return true if other is a partner of this.
505bool TabVector::IsAPartner(const TabVector* other) {

Callers 5

FindImagePartitionsMethod · 0.45
FindPartitionPartnersMethod · 0.45
DeleteMethod · 0.45
AddPartnerVectorMethod · 0.45

Calls 5

IsSeparatorMethod · 0.80
dataMethod · 0.80
emptyMethod · 0.45
move_to_lastMethod · 0.45
add_after_then_moveMethod · 0.45

Tested by

no test coverage detected