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

lemur::utility::ArrayCounter< T > 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 lemur::utility::ArrayCounter< T >:

lemur::utility::ModifiableCounter lemur::utility::Counter List of all members.

Public Member Functions

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

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

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

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

Protected Attributes

T * ct
int sz
total
int pos

Detailed Description

template<class T>
class lemur::utility::ArrayCounter< T >

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>
lemur::utility::ArrayCounter< T >::ArrayCounter int  size  )  [inline]
 

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


Member Function Documentation

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

return the count of an event

Implements lemur::utility::Counter.

template<class T>
virtual bool lemur::utility::ArrayCounter< T >::hasMore  )  const [inline, virtual]
 

Implements lemur::utility::Counter.

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

Implements lemur::utility::ModifiableCounter.

template<class T>
virtual void lemur::utility::ArrayCounter< T >::nextCount int &  eventIndex,
double &  count
const [inline, virtual]
 

Implements lemur::utility::Counter.

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

Implements lemur::utility::ModifiableCounter.

template<class T>
virtual void lemur::utility::ArrayCounter< T >::startIteration  )  const [inline, virtual]
 

iteration over non-zero counts

Implements lemur::utility::Counter.

template<class T>
virtual double lemur::utility::ArrayCounter< T >::sum  )  const [inline, virtual]
 

return the sum of all counts

Implements lemur::utility::Counter.


Member Data Documentation

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

template<class T>
int lemur::utility::ArrayCounter< T >::pos [mutable, protected]
 

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

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


The documentation for this class was generated from the following file:
Generated on Tue Jun 15 11:03:07 2010 for Lemur by doxygen 1.3.4