TopKList Class Reference

#include <TopKList.h>

List of all members.

Public Types

typedef cnt_topic_t * iterator

Public Member Functions

 TopKList (int K_)
virtual ~TopKList ()
void insert_word (const cnt_word_t &cnt_word)
bool is_sorted ()
cnt_word_t get_max ()
iterator get_beg ()
iterator get_end ()
void print ()
void clear ()

Member Typedef Documentation

typedef cnt_topic_t* TopKList::iterator

Constructor & Destructor Documentation

TopKList::TopKList ( int  K_  ) 

Constructs a TopKList supporting top K_ elements

TopKList::~TopKList (  )  [virtual]

Member Function Documentation

void TopKList::clear (  ) 

Clears the list

TopKList::iterator TopKList::get_beg (  ) 

Iterator methods. Return an iterator to the beginning of the list

TopKList::iterator TopKList::get_end (  ) 

Iterator methods. Return an iterator to the end of the list

cnt_word_t TopKList::get_max (  ) 

Returns the max element which is the first elem

void TopKList::insert_word ( const cnt_word_t &  cnt_word  ) 
bool TopKList::is_sorted (  ) 

Used for test convenience. Just to check the array is always sorted and has at most K elems. Should return true at any point of time

void TopKList::print (  ) 

Print the list to log(INFO)


The documentation for this class was generated from the following files:
Generated on Tue Jul 19 11:45:28 2011 for Y!LDA by  doxygen 1.6.3