tesseract
3.03
|
#include <shapetable.h>
Public Member Functions | |
UnicharRating () | |
UnicharRating (int u, float r) | |
Static Public Member Functions | |
static int | SortDescendingRating (const void *t1, const void *t2) |
static int | FirstResultWithUnichar (const GenericVector< UnicharRating > &results, UNICHAR_ID unichar_id) |
Public Attributes | |
UNICHAR_ID | unichar_id |
float | rating |
GenericVector< int > | fonts |
Definition at line 42 of file shapetable.h.
tesseract::UnicharRating::UnicharRating | ( | ) | [inline] |
Definition at line 43 of file shapetable.h.
: unichar_id(0), rating(0.0f) {}
tesseract::UnicharRating::UnicharRating | ( | int | u, |
float | r | ||
) | [inline] |
Definition at line 44 of file shapetable.h.
: unichar_id(u), rating(r) {}
int tesseract::UnicharRating::FirstResultWithUnichar | ( | const GenericVector< UnicharRating > & | results, |
UNICHAR_ID | unichar_id | ||
) | [static] |
Definition at line 56 of file shapetable.cpp.
{ for (int r = 0; r < results.size(); ++r) { if (results[r].unichar_id == unichar_id) return r; } return -1; }
static int tesseract::UnicharRating::SortDescendingRating | ( | const void * | t1, |
const void * | t2 | ||
) | [inline, static] |
Definition at line 48 of file shapetable.h.
{ const UnicharRating* a = reinterpret_cast<const UnicharRating *>(t1); const UnicharRating* b = reinterpret_cast<const UnicharRating *>(t2); if (a->rating > b->rating) { return -1; } else if (a->rating < b->rating) { return 1; } else { return a->unichar_id - b->unichar_id; } }
Definition at line 73 of file shapetable.h.
Definition at line 70 of file shapetable.h.
Definition at line 67 of file shapetable.h.