#include <matrix.h>
List of all members.
Detailed Description
Definition at line 193 of file matrix.h.
Constructor & Destructor Documentation
MATRIX::MATRIX |
( |
int |
dimension | ) |
[inline] |
Member Function Documentation
void MATRIX::print |
( |
const UNICHARSET & |
unicharset | ) |
const |
Definition at line 36 of file matrix.cpp.
{
tprintf("Ratings Matrix (top choices)\n");
int row, col;
for (col = 0; col < this->dimension(); ++col) tprintf("\t%d", col);
tprintf("\n");
for (row = 0; row < this->dimension(); ++row) {
for (col = 0; col <= row; ++col) {
if (col == 0) tprintf("%d\t", row);
BLOB_CHOICE_LIST *rating = this->get(col, row);
if (rating != NOT_CLASSIFIED) {
BLOB_CHOICE_IT b_it(rating);
int counter = 0;
for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
tprintf("%s ", unicharset.id_to_unichar(b_it.data()->unichar_id()));
++counter;
if (counter == 3) break;
}
tprintf("\t");
} else {
tprintf(" \t");
}
}
tprintf("\n");
}
}
The documentation for this class was generated from the following files: