tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
SortHelper< T > Class Template Reference

#include <sorthelper.h>

Collaboration diagram for SortHelper< T >:

Classes

struct  SortPair
 

Public Member Functions

 SortHelper (int sizehint)
 
void Add (T value, int count)
 
int MaxCount (T *max_value) const
 
const GenericVector< SortPair< T > > & SortByCount ()
 
const GenericVector< SortPair< T > > & SortByValue ()
 

Static Public Member Functions

static int SortPairsByCount (const void *v1, const void *v2)
 
static int SortPairsByValue (const void *v1, const void *v2)
 

Private Attributes

GenericVector< SortPair< T > > counts_
 

Constructor & Destructor Documentation

◆ SortHelper()

template<typename T >
SortHelper< T >::SortHelper ( int  sizehint)
inlineexplicit

Member Function Documentation

◆ Add()

template<typename T >
void SortHelper< T >::Add ( value,
int  count 
)
inline

◆ MaxCount()

template<typename T >
int SortHelper< T >::MaxCount ( T *  max_value) const
inline

◆ SortByCount()

template<typename T >
const GenericVector<SortPair<T> >& SortHelper< T >::SortByCount ( )
inline

◆ SortByValue()

template<typename T >
const GenericVector<SortPair<T> >& SortHelper< T >::SortByValue ( )
inline

◆ SortPairsByCount()

template<typename T >
static int SortHelper< T >::SortPairsByCount ( const void *  v1,
const void *  v2 
)
inlinestatic

◆ SortPairsByValue()

template<typename T >
static int SortHelper< T >::SortPairsByValue ( const void *  v1,
const void *  v2 
)
inlinestatic

Member Data Documentation

◆ counts_

template<typename T >
GenericVector<SortPair<T> > SortHelper< T >::counts_
private

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