tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
STATS Class Reference

#include <statistc.h>

Public Member Functions

 STATS (int32_t min_bucket_value, int32_t max_bucket_value_plus_1)
 
 STATS ()
 
 ~STATS ()
 
bool set_range (int32_t min_bucket_value, int32_t max_bucket_value_plus_1)
 
void clear ()
 
void add (int32_t value, int32_t count)
 
int32_t mode () const
 
double mean () const
 
double sd () const
 
double ile (double frac) const
 
int32_t min_bucket () const
 
int32_t max_bucket () const
 
double median () const
 
int32_t pile_count (int32_t value) const
 
int32_t get_total () const
 
bool local_min (int32_t x) const
 
void smooth (int32_t factor)
 
int32_t cluster (float lower, float upper, float multiple, int32_t max_clusters, STATS *clusters)
 
int top_n_modes (int max_modes, GenericVector< tesseract::KDPairInc< float, int > > *modes) const
 
void print () const
 
void print_summary () const
 
void plot (ScrollView *window, float xorigin, float yorigin, float xscale, float yscale, ScrollView::Color colour) const
 
void plotline (ScrollView *window, float xorigin, float yorigin, float xscale, float yscale, ScrollView::Color colour) const
 

Private Attributes

int32_t rangemin_
 
int32_t rangemax_
 
int32_t total_count_
 
int32_t * buckets_
 

Constructor & Destructor Documentation

◆ STATS() [1/2]

STATS::STATS ( int32_t  min_bucket_value,
int32_t  max_bucket_value_plus_1 
)

◆ STATS() [2/2]

STATS::STATS ( )

◆ ~STATS()

STATS::~STATS ( )

Member Function Documentation

◆ add()

void STATS::add ( int32_t  value,
int32_t  count 
)

◆ clear()

void STATS::clear ( )

◆ cluster()

int32_t STATS::cluster ( float  lower,
float  upper,
float  multiple,
int32_t  max_clusters,
STATS clusters 
)

◆ get_total()

int32_t STATS::get_total ( ) const
inline

◆ ile()

double STATS::ile ( double  frac) const

◆ local_min()

bool STATS::local_min ( int32_t  x) const

◆ max_bucket()

int32_t STATS::max_bucket ( ) const

◆ mean()

double STATS::mean ( ) const

◆ median()

double STATS::median ( ) const

◆ min_bucket()

int32_t STATS::min_bucket ( ) const

◆ mode()

int32_t STATS::mode ( ) const

◆ pile_count()

int32_t STATS::pile_count ( int32_t  value) const
inline

◆ plot()

void STATS::plot ( ScrollView window,
float  xorigin,
float  yorigin,
float  xscale,
float  yscale,
ScrollView::Color  colour 
) const

◆ plotline()

void STATS::plotline ( ScrollView window,
float  xorigin,
float  yorigin,
float  xscale,
float  yscale,
ScrollView::Color  colour 
) const

◆ print()

void STATS::print ( ) const

◆ print_summary()

void STATS::print_summary ( ) const

◆ sd()

double STATS::sd ( ) const

◆ set_range()

bool STATS::set_range ( int32_t  min_bucket_value,
int32_t  max_bucket_value_plus_1 
)

◆ smooth()

void STATS::smooth ( int32_t  factor)

◆ top_n_modes()

int STATS::top_n_modes ( int  max_modes,
GenericVector< tesseract::KDPairInc< float, int > > *  modes 
) const

Member Data Documentation

◆ buckets_

int32_t* STATS::buckets_
private

◆ rangemax_

int32_t STATS::rangemax_
private

◆ rangemin_

int32_t STATS::rangemin_
private

◆ total_count_

int32_t STATS::total_count_
private

The documentation for this class was generated from the following files: