User Manual, Developers Guide and API Documentation

wns::TimeWeightedAverage< T, Clock > Class Template Reference

Build the time weighted average.

#include <TimeWeightedAverage.hpp>

Inheritance diagram for wns::TimeWeightedAverage< T, Clock >:

Inheritance graph
[legend]
Collaboration diagram for wns::TimeWeightedAverage< T, Clock >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void put (const T &t)
 Add a sample to the average.
virtual void put (const T &, double)
 Don't use this method when using TimeWeightedAverage.
virtual void reset ()
 Reset the average.
void setClock (Clock *_c)
 Set the clock that should be used to compute the time differences between two put() calls.
 TimeWeightedAverage (Clock *_c)
 Takes a Clock as parameter.
 TimeWeightedAverage ()
 Default constructor, pointer to Clock is NULL!

Private Attributes

Clock * c
 The clock that is used for timing.
double lastTime
 Last time a sample was added.


Detailed Description

template<typename T, typename Clock>
class wns::TimeWeightedAverage< T, Clock >

Definition at line 41 of file TimeWeightedAverage.hpp.


Constructor & Destructor Documentation

template<typename T, typename Clock>
wns::TimeWeightedAverage< T, Clock >::TimeWeightedAverage (  )  [inline]

Definition at line 48 of file TimeWeightedAverage.hpp.

template<typename T, typename Clock>
wns::TimeWeightedAverage< T, Clock >::TimeWeightedAverage ( Clock *  _c  )  [inline]

Definition at line 57 of file TimeWeightedAverage.hpp.


Member Function Documentation

template<typename T, typename Clock>
virtual void wns::TimeWeightedAverage< T, Clock >::put ( const T &  t  )  [inline, virtual]

Reimplemented from wns::WeightedAverage< T >.

Definition at line 93 of file TimeWeightedAverage.hpp.

template<typename T, typename Clock>
virtual void wns::TimeWeightedAverage< T, Clock >::put ( const T &  ,
double   
) [inline, virtual]

Reimplemented from wns::WeightedAverage< T >.

Definition at line 85 of file TimeWeightedAverage.hpp.

template<typename T, typename Clock>
virtual void wns::TimeWeightedAverage< T, Clock >::reset (  )  [inline, virtual]

Reimplemented from wns::WeightedAverage< T >.

Definition at line 75 of file TimeWeightedAverage.hpp.

template<typename T, typename Clock>
void wns::TimeWeightedAverage< T, Clock >::setClock ( Clock *  _c  )  [inline]

Definition at line 67 of file TimeWeightedAverage.hpp.


Member Data Documentation

template<typename T, typename Clock>
Clock* wns::TimeWeightedAverage< T, Clock >::c [private]

Definition at line 111 of file TimeWeightedAverage.hpp.

template<typename T, typename Clock>
double wns::TimeWeightedAverage< T, Clock >::lastTime [private]

Definition at line 100 of file TimeWeightedAverage.hpp.


The documentation for this class was generated from the following file:

Generated on Sat May 26 03:32:51 2012 for openWNS by  doxygen 1.5.5