40 BLOB_CHOICE_IT b_it(
get(col, row));
41 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
65 for (
int col = ind; col >= 0 && col > ind - band_width; --col) {
66 if (
array_[col * band_width + band_width - 1] !=
empty_) {
71 auto *result =
new MATRIX(dim + 1, band_width);
73 for (
int col = 0; col < dim; ++col) {
74 for (
int row = col; row < dim && row < col +
bandwidth(); ++row) {
77 BLOB_CHOICE_LIST *choices =
get(col, row);
78 if (choices !=
nullptr) {
80 BLOB_CHOICE_IT bc_it(choices);
81 for (bc_it.mark_cycle_pt(); !bc_it.cycled_list(); bc_it.forward()) {
86 result->put(coord.
col, coord.
row, choices);
100 auto *result =
new MATRIX(dim, band_width);
101 for (
int col = 0; col < dim; ++col) {
102 for (
int row = col; row < dim && row < col + band_width; ++row) {
103 BLOB_CHOICE_LIST *choices =
get(col, row);
104 if (choices !=
nullptr) {
105 auto *copy_choices =
new BLOB_CHOICE_LIST;
107 result->put(col, row, copy_choices);
116 tprintf(
"Ratings Matrix (top 3 choices)\n");
120 for (col = 0; col < dim; ++col) {
121 for (row = col; row < dim && row < col + band_width; ++row) {
122 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()) {
130 b_it.data()->rating(), b_it.data()->certainty());
137 for (col = 0; col < dim; ++col) {
141 for (row = 0; row < dim; ++row) {
142 for (col = 0; col <= row; ++col) {
146 if (row >= col + band_width) {
150 BLOB_CHOICE_LIST *rating = this->
get(col, row);
152 BLOB_CHOICE_IT b_it(rating);
154 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
void tprintf(const char *format,...)
BLOB_CHOICE_LIST * * array_
void ResizeWithCopy(int size1, int size2)
BLOB_CHOICE_LIST * get(ICOORD pos) const
BLOB_CHOICE_LIST * empty_
MATRIX * ConsumeAndMakeBigger(int ind)
bool Classified(int col, int row, int wildcard_id) const
MATRIX * DeepCopy() const
MATRIX(int dimension, int bandwidth)
void IncreaseBandSize(int bandwidth)
void print(const UNICHARSET &unicharset) const
void MapForSplit(int ind)
bool Valid(const MATRIX &m) const
void set_matrix_cell(int col, int row)
static BLOB_CHOICE * deep_copy(const BLOB_CHOICE *src)
bool IsClassified() const
const char * id_to_unichar(UNICHAR_ID id) const