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

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

ModifiableCounter Counter List of all members.

Public Methods

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

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


Member Function Documentation

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

return the count of an event

Implements Counter.

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

Implements Counter.

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

Implements ModifiableCounter.

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

Implements Counter.

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

Implements ModifiableCounter.

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

iteration over non-zero counts

Implements Counter.

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

return the sum of all counts

Implements 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 on Wed Nov 3 12:59:23 2004 for Lemur Toolkit by doxygen1.2.18