Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <SmoothCompareTrans.h>
Inheritance diagram for SmoothCompareTrans< T >:
Has the additional requirement that template types must supply operator*=(float) and operator+=(T) for the weighted average
The gamma parameter is how much to weight the preceeding value - 1 will cause it to never update, 0 will cause it to only look at most recent. So, the lower the value, the faster it is to switch, but more prone to noise
Definition at line 15 of file SmoothCompareTrans.h.
Public Member Functions | |
SmoothCompareTrans (StateNode *source, StateNode *destination, const T *monitor, typename SmoothCompareTrans< T >::Test_t test, const T &value, const EventBase &poll, float gammap=0) | |
constructor, see class notes for information | |
virtual void | processEvent (const EventBase &e) |
don't care about the event, just a pulse to check the values | |
Protected Attributes | |
T | avg |
the current running average | |
const T * | realmon |
pointer to the value being monitored | |
float | g |
the gamma value controlling the exponential average, see the class documentation at the top | |
Private Member Functions | |
SmoothCompareTrans (const SmoothCompareTrans &node) | |
don't call this | |
SmoothCompareTrans | operator= (const SmoothCompareTrans &node) |
don't call this |
|
constructor, see class notes for information
Definition at line 18 of file SmoothCompareTrans.h. References SmoothCompareTrans< T >::avg, SmoothCompareTrans< T >::g, and SmoothCompareTrans< T >::realmon. |
|
don't call this
|
|
don't call this
|
|
don't care about the event, just a pulse to check the values
Reimplemented from CompareTrans< T >. Definition at line 23 of file SmoothCompareTrans.h. References SmoothCompareTrans< T >::avg, SmoothCompareTrans< T >::g, CompareTrans< T >::processEvent(), and SmoothCompareTrans< T >::realmon. |
|
the current running average
Definition at line 31 of file SmoothCompareTrans.h. |
|
the gamma value controlling the exponential average, see the class documentation at the top
Definition at line 35 of file SmoothCompareTrans.h. |
|
pointer to the value being monitored
Definition at line 32 of file SmoothCompareTrans.h. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:09:10 2003 by Doxygen 1.3.2 |