User Manual, Developers Guide and API Documentation

wns::Average< C > Class Template Reference

Computes the average of a number of samples.

#include <Average.hpp>

Inheritance diagram for wns::Average< C >:

Inheritance graph
[legend]
Collaboration diagram for wns::Average< C >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Average ()
 Default constructor.
virtual C get () const
 Returns the current average.
virtual void put (const C &c)
 Add a sample.
virtual ~Average ()
 Destructor.

Protected Member Functions

C convertForAveraged (double result) const
 Supports averaging of other types like Power or Ratio.
double convertForAveraging (const C &c) const
 Supports averaging of other values like Power or Ratio.


Detailed Description

template<typename C>
class wns::Average< C >

Definition at line 89 of file Average.hpp.


Constructor & Destructor Documentation

template<typename C>
wns::Average< C >::Average (  )  [inline]

Definition at line 96 of file Average.hpp.

template<typename C>
virtual wns::Average< C >::~Average (  )  [inline, virtual]

Definition at line 106 of file Average.hpp.


Member Function Documentation

template<typename C>
C wns::Average< C >::convertForAveraged ( double  result  )  const [inline, protected]

Note:
To support the averaging of other types these types need to provide a method convertForAveraged which is called when the average is requested via the get() method.

Definition at line 141 of file Average.hpp.

template<typename C>
double wns::Average< C >::convertForAveraging ( const C c  )  const [inline, protected]

Note:
To support the averaging of other types these types need to provide a method convertForAveraging which is called when a value is added to the average via the put() method.

Definition at line 155 of file Average.hpp.

template<typename C>
virtual C wns::Average< C >::get (  )  const [inline, virtual]

Definition at line 126 of file Average.hpp.

template<typename C>
virtual void wns::Average< C >::put ( const C c  )  [inline, virtual]


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

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