#include <Counter.hpp>
Inheritance diagram for Counter:
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 |
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.
|
|
|
return the count of a word.
Reimplemented in ArrayCounter. |
|
Reimplemented in ArrayCounter. |
|
Reimplemented in ArrayCounter. |
|
iteration over non-zero counts.
Reimplemented in ArrayCounter. |
|
return the sum of all counts.
Reimplemented in ArrayCounter. |