43 BLOB_CHOICE_IT b_it(
get(col, row));
44 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
67 for (
int col = ind; col >= 0 && col > ind - band_width; --col) {
68 if (
array_[col * band_width + band_width - 1] !=
empty_) {
75 for (
int col = 0; col < dim; ++col) {
76 for (
int row = col; row < dim && row < col +
bandwidth(); ++row) {
79 BLOB_CHOICE_LIST* choices =
get(col, row);
80 if (choices !=
nullptr) {
82 BLOB_CHOICE_IT bc_it(choices);
83 for (bc_it.mark_cycle_pt(); !bc_it.cycled_list(); bc_it.forward()) {
88 result->
put(coord.
col, coord.
row, choices);
103 for (
int col = 0; col < dim; ++col) {
104 for (
int row = col; row < dim && row < col + band_width; ++row) {
105 BLOB_CHOICE_LIST* choices =
get(col, row);
106 if (choices !=
nullptr) {
107 BLOB_CHOICE_LIST* copy_choices =
new BLOB_CHOICE_LIST;
109 result->
put(col, row, copy_choices);
118 tprintf(
"Ratings Matrix (top 3 choices)\n");
122 for (col = 0; col < dim; ++col) {
123 for (row = col; row < dim && row < col + band_width; ++row) {
124 BLOB_CHOICE_LIST *rating = this->
get(col, row);
126 BLOB_CHOICE_IT b_it(rating);
127 tprintf(
"col=%d row=%d ", col, row);
128 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
131 b_it.data()->rating(), b_it.data()->certainty());
138 for (col = 0; col < dim; ++col)
tprintf(
"\t%d", col);
140 for (row = 0; row < dim; ++row) {
141 for (col = 0; col <= row; ++col) {
142 if (col == 0)
tprintf(
"%d\t", row);
143 if (row >= col + band_width) {
147 BLOB_CHOICE_LIST *rating = this->
get(col, row);
149 BLOB_CHOICE_IT b_it(rating);
151 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
155 if (counter == 3)
break;
void print(const UNICHARSET &unicharset) const
void MapForSplit(int ind)
MATRIX * ConsumeAndMakeBigger(int ind)
void set_matrix_cell(int col, int row)
bool Valid(const MATRIX &m) const
static BLOB_CHOICE * deep_copy(const BLOB_CHOICE *src)
void IncreaseBandSize(int bandwidth)
BLOB_CHOICE_LIST * * array_
BLOB_CHOICE_LIST * empty_
MATRIX(int dimension, int bandwidth)
DLLSYM void tprintf(const char *format,...)
void put(ICOORD pos, const T &thing)
bool IsClassified() const
MATRIX * DeepCopy() const
bool Classified(int col, int row, int wildcard_id) const
const char * id_to_unichar(UNICHAR_ID id) const
void ResizeWithCopy(int size1, int size2)