Get a sample by its font, class, index. Does not randomize. OrganizeByFontAndClass must have been already called.
| 189 | // Get a sample by its font, class, index. Does not randomize. |
| 190 | // OrganizeByFontAndClass must have been already called. |
| 191 | TrainingSample* TrainingSampleSet::MutableSample(int font_id, int class_id, |
| 192 | int index) { |
| 193 | ASSERT_HOST(font_class_array_ != NULL); |
| 194 | int font_index = font_id_map_.SparseToCompact(font_id); |
| 195 | if (font_index < 0) return NULL; |
| 196 | int sample_index = (*font_class_array_)(font_index, class_id).samples[index]; |
| 197 | return samples_[sample_index]; |
| 198 | } |
| 199 | |
| 200 | // Returns a string debug representation of the given sample: |
| 201 | // font, unichar_str, bounding box, page. |
nothing calls this directly
no test coverage detected