Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Counter Class Reference

Abstract Counter class. More...

#include <Counter.hpp>

Inheritance diagram for Counter:

ModifiableCounter ArrayCounter< T > ArrayCounter< double > ArrayCounter< int > RelDocUnigramCounter DocUnigramCounter List of all members.

Public Methods

virtual ~Counter ()
virtual double count (int eventIndex) const=0
 return the count of a word

virtual double sum () const=0
 return the sum of all counts

virtual void startIteration () const=0
 iteration over non-zero counts

virtual bool hasMore () const=0
virtual void nextCount (int &eventIndex, double &count) const=0

Detailed Description

Abstract Counter class.

The double type, rather than int type, is used so that it may be useful in a setting like EM. The event index has a range [0,N]. The caller is responsible for boundary check if necessary.


Constructor & Destructor Documentation

virtual Counter::~Counter   [inline, virtual]
 


Member Function Documentation

virtual double Counter::count int    eventIndex const [pure virtual]
 

return the count of a word

Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >.

virtual bool Counter::hasMore   [pure virtual]
 

Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >.

virtual void Counter::nextCount int &    eventIndex,
double &    count
const [pure virtual]
 

Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >.

virtual void Counter::startIteration   [pure virtual]
 

iteration over non-zero counts

Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >.

virtual double Counter::sum   [pure virtual]
 

return the sum of all counts

Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >.


The documentation for this class was generated from the following file:
Generated on Wed Nov 3 12:59:29 2004 for Lemur Toolkit by doxygen1.2.18