#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
Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >. |
|
|
Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >. |
|
||||||||||||
|
Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >. |
|
|
iteration over non-zero counts
Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >. |
|
|
return the sum of all counts
Implemented in ArrayCounter< T >, ArrayCounter< double >, and ArrayCounter< int >. |
1.2.16