tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
MinK< Key, Value > Class Template Reference
Collaboration diagram for MinK< Key, Value >:

Classes

struct  Element
 

Public Member Functions

 MinK (Key max_key, int k)
 
 ~MinK ()
 
bool insert (Key k, Value v)
 
const Key & max_insertable_key ()
 
int elements_count ()
 
const Elementelements ()
 

Private Attributes

const Key max_key_
 
Elementelements_
 
int elements_count_
 
int k_
 
int max_index_
 

Detailed Description

template<typename Key, typename Value>
class MinK< Key, Value >

Store the k smallest-keyed key-value pairs.

Constructor & Destructor Documentation

◆ MinK()

template<typename Key, typename Value >
MinK< Key, Value >::MinK ( Key  max_key,
int  k 
)

◆ ~MinK()

template<typename Key , typename Value >
MinK< Key, Value >::~MinK ( )

Member Function Documentation

◆ elements()

template<typename Key, typename Value>
const Element* MinK< Key, Value >::elements ( )
inline

◆ elements_count()

template<typename Key, typename Value>
int MinK< Key, Value >::elements_count ( )
inline

◆ insert()

template<typename Key, typename Value>
bool MinK< Key, Value >::insert ( Key  k,
Value  v 
)

◆ max_insertable_key()

template<typename Key , typename Value >
const Key & MinK< Key, Value >::max_insertable_key ( )

Member Data Documentation

◆ elements_

template<typename Key, typename Value>
Element* MinK< Key, Value >::elements_
private

◆ elements_count_

template<typename Key, typename Value>
int MinK< Key, Value >::elements_count_
private

◆ k_

template<typename Key, typename Value>
int MinK< Key, Value >::k_
private

◆ max_index_

template<typename Key, typename Value>
int MinK< Key, Value >::max_index_
private

◆ max_key_

template<typename Key, typename Value>
const Key MinK< Key, Value >::max_key_
private

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