SPUC  3.0
Public Member Functions | Protected Attributes | List of all members
SPUC::running_sum< Numeric > Class Template Reference

template class running average filter consisting of a delay line, adder and subtractor More...

#include <running_sum.h>

Public Member Functions

 running_sum (long n=0)
 / Constructor More...
 
running_sumoperator= (const running_sum &rhs)
 Assignment. More...
 
void set_size (long n)
 
 ~running_sum (void)
 destructor More...
 
void reset (void)
 Reset/clear. More...
 
Numeric get_result ()
 return result More...
 
Numeric update (Numeric in)
 Clock in new input sample. More...
 
Numeric average (Numeric in)
 

Protected Attributes

Numeric result
 
delay< Numeric > z
 
long size
 
float_type inv_size
 

Detailed Description

template<class Numeric>
class SPUC::running_sum< Numeric >

template class running average filter consisting of a delay line, adder and subtractor

Author
Tony Kirke
running_sum.png
running_sum.gif

Constructor & Destructor Documentation

template<class Numeric >
SPUC::running_sum< Numeric >::running_sum ( long  n = 0)
inline

/ Constructor

References SPUC::delay< Numeric >::reset(), and SPUC::delay< Numeric >::set_size().

Here is the call graph for this function:

template<class Numeric >
SPUC::running_sum< Numeric >::~running_sum ( void  )
inline

destructor

Member Function Documentation

template<class Numeric >
Numeric SPUC::running_sum< Numeric >::average ( Numeric  in)
inline

References SPUC::running_sum< Numeric >::update().

Here is the call graph for this function:

template<class Numeric >
Numeric SPUC::running_sum< Numeric >::get_result ( )
inline

return result

template<class Numeric >
running_sum& SPUC::running_sum< Numeric >::operator= ( const running_sum< Numeric > &  rhs)
inline
template<class Numeric >
void SPUC::running_sum< Numeric >::reset ( void  )
inline

Reset/clear.

References SPUC::delay< Numeric >::reset().

Here is the call graph for this function:

template<class Numeric >
void SPUC::running_sum< Numeric >::set_size ( long  n)
inline

References SPUC::delay< Numeric >::set_size().

Here is the call graph for this function:

template<class Numeric >
Numeric SPUC::running_sum< Numeric >::update ( Numeric  in)
inline

Clock in new input sample.

References SPUC::delay< Numeric >::input(), and SPUC::delay< Numeric >::last().

Referenced by SPUC::running_sum< Numeric >::average().

Here is the call graph for this function:

Member Data Documentation

template<class Numeric >
float_type SPUC::running_sum< Numeric >::inv_size
protected
template<class Numeric >
Numeric SPUC::running_sum< Numeric >::result
protected
template<class Numeric >
long SPUC::running_sum< Numeric >::size
protected
template<class Numeric >
delay<Numeric> SPUC::running_sum< Numeric >::z
protected

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