Tesseract  3.02
tesseract::ShapeRating Struct Reference

#include <shapeclassifier.h>

List of all members.

Public Member Functions

 ShapeRating ()
 ShapeRating (int s, float r)

Static Public Member Functions

static int SortDescendingRating (const void *t1, const void *t2)

Public Attributes

int shape_id
float rating
float raw
float font

Detailed Description

Definition at line 36 of file shapeclassifier.h.


Constructor & Destructor Documentation

tesseract::ShapeRating::ShapeRating ( ) [inline]

Definition at line 37 of file shapeclassifier.h.

: shape_id(0), rating(0.0f), raw(0.0f), font(0.0f) {}
tesseract::ShapeRating::ShapeRating ( int  s,
float  r 
) [inline]

Definition at line 38 of file shapeclassifier.h.

    : shape_id(s), rating(r), raw(1.0f), font(0.0f) {}

Member Function Documentation

static int tesseract::ShapeRating::SortDescendingRating ( const void *  t1,
const void *  t2 
) [inline, static]

Definition at line 42 of file shapeclassifier.h.

                                                                  {
    const ShapeRating* a = reinterpret_cast<const ShapeRating *>(t1);
    const ShapeRating* b = reinterpret_cast<const ShapeRating *>(t2);
    if (a->rating > b->rating) {
      return -1;
    } else if (a->rating < b->rating) {
      return 1;
    } else {
      return a->shape_id - b->shape_id;
    }
  }

Member Data Documentation

Definition at line 62 of file shapeclassifier.h.

Definition at line 58 of file shapeclassifier.h.

Definition at line 60 of file shapeclassifier.h.

Definition at line 55 of file shapeclassifier.h.


The documentation for this struct was generated from the following file: