Main Page   Namespace List   Class Hierarchy   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)=0
 return the count of a word

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

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

virtual bool hasMore ()=0
virtual void nextCount (int &eventIndex, double &count)=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 [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
[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 Fri Feb 6 07:11:59 2004 for LEMUR by doxygen1.2.16