Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ArrayCounter Class Template Reference

Counts stored in an array ( when the element type is int, float/double typed counts will be converted to an integer). More...

#include <Counter.hpp>

Inheritance diagram for ArrayCounter:

ModifiableCounter Counter DocUnigramCounter List of all members.

Public Methods

 ArrayCounter (int size)
virtual ~ArrayCounter ()
virtual double count (int eventIndex)
 return the count of an event.

virtual double sum ()
 return the sum of all counts.

virtual void incCount (int eventIndex,double count)
virtual void setCount (int eventIndex,double count)
virtual void startIteration ()
 iteration over non-zero counts.

virtual bool hasMore ()
virtual void nextCount (int &eventIndex,double &count)

Protected Attributes

T* ct
int sz
total
int pos

Detailed Description

template<class T> class ArrayCounter

Counts stored in an array ( when the element type is int, float/double typed counts will be converted to an integer).


Constructor & Destructor Documentation

template<class T>
ArrayCounter<T>::ArrayCounter<T> ( int size ) [inline]
 

template<class T>
ArrayCounter<T>::~ArrayCounter<T> ( ) [inline, virtual]
 


Member Function Documentation

template<class T>
double ArrayCounter<T>::count ( int eventIndex ) [inline, virtual]
 

return the count of an event.

Reimplemented from Counter.

template<class T>
bool ArrayCounter<T>::hasMore ( ) [inline, virtual]
 

Reimplemented from Counter.

template<class T>
void ArrayCounter<T>::incCount ( int eventIndex,
double count ) [inline, virtual]
 

Reimplemented from ModifiableCounter.

template<class T>
void ArrayCounter<T>::nextCount ( int & eventIndex,
double & count ) [inline, virtual]
 

Reimplemented from Counter.

template<class T>
void ArrayCounter<T>::setCount ( int eventIndex,
double count ) [inline, virtual]
 

Reimplemented from ModifiableCounter.

template<class T>
void ArrayCounter<T>::startIteration ( ) [inline, virtual]
 

iteration over non-zero counts.

Reimplemented from Counter.

template<class T>
double ArrayCounter<T>::sum ( ) [inline, virtual]
 

return the sum of all counts.

Reimplemented from Counter.


Member Data Documentation

template<class T>
T * ArrayCounter<T>::ct [protected]
 

template<class T>
int ArrayCounter<T>::pos [protected]
 

template<class T>
int ArrayCounter<T>::sz [protected]
 

template<class T>
T ArrayCounter<T>::total [protected]
 


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