#include <Counter.hpp>
Inheritance diagram for lemur::utility::Counter:

Public Member Functions | |
| 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 |
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 lemur::utility::ArrayCounter< T >, lemur::utility::ArrayCounter< double >, and lemur::utility::ArrayCounter< int >. |
|
|
Implemented in lemur::utility::ArrayCounter< T >, lemur::utility::ArrayCounter< double >, and lemur::utility::ArrayCounter< int >. |
|
||||||||||||
|
Implemented in lemur::utility::ArrayCounter< T >, lemur::utility::ArrayCounter< double >, and lemur::utility::ArrayCounter< int >. |
|
|
iteration over non-zero counts
Implemented in lemur::utility::ArrayCounter< T >, lemur::utility::ArrayCounter< double >, and lemur::utility::ArrayCounter< int >. |
|
|
return the sum of all counts
Implemented in lemur::utility::ArrayCounter< T >, lemur::utility::ArrayCounter< double >, and lemur::utility::ArrayCounter< int >. |
1.3.4