Returns the total index of the requested sample. OrganizeByFontAndClass must have been already called.
| 450 | // Returns the total index of the requested sample. |
| 451 | // OrganizeByFontAndClass must have been already called. |
| 452 | int TrainingSampleSet::GlobalSampleIndex(int font_id, int class_id, |
| 453 | int index) const { |
| 454 | ASSERT_HOST(font_class_array_ != NULL); |
| 455 | int font_index = font_id_map_.SparseToCompact(font_id); |
| 456 | if (font_index < 0) return -1; |
| 457 | return (*font_class_array_)(font_index, class_id).samples[index]; |
| 458 | } |
| 459 | |
| 460 | // Gets the canonical sample for the given font, class pair. |
| 461 | // ComputeCanonicalSamples must have been called first. |
nothing calls this directly
no test coverage detected