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 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

Counter::~Counter ( ) [inline, virtual]
 


Member Function Documentation

double Counter::count ( int eventIndex ) [pure virtual]
 

return the count of a word.

Reimplemented in ArrayCounter.

virtual bool Counter::hasMore ( ) [pure virtual]
 

Reimplemented in ArrayCounter.

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

Reimplemented in ArrayCounter.

void Counter::startIteration ( ) [pure virtual]
 

iteration over non-zero counts.

Reimplemented in ArrayCounter.

double Counter::sum ( ) [pure virtual]
 

return the sum of all counts.

Reimplemented in ArrayCounter.


The documentation for this class was generated from the following file:
Generated at Fri Jul 26 18:22:44 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000