OpenWareLaboratory
StiffValue< T > Class Template Reference

Applies simple hysteresis to a scalar. More...

Public Member Functions

getValue ()
 
template<>
float normal (float delta)
 
template<>
int normal (float delta)
 
 operator T ()
 
StiffValue< T > & operator*= (const T &other)
 
StiffValue< T > & operator+= (const T &other)
 
StiffValue< T > & operator-= (const T &other)
 
StiffValue< T > & operator/= (const T &other)
 
StiffValue< T > & operator= (const T &other)
 
void reset (T newValue)
 
 StiffValue ()
 
 StiffValue (T d)
 
 StiffValue (T d, T initialValue)
 
void update (T newValue)
 

Static Public Member Functions

static T normal (float delta)
 

Data Fields

delta
 

Detailed Description

template<typename T>
class StiffValue< T >

Applies simple hysteresis to a scalar.

Only updates the value if the absolute difference is greater than delta

Definition at line 66 of file SmoothValue.h.

Constructor & Destructor Documentation

template<typename T >
StiffValue< T >::StiffValue ( )
inline

Definition at line 71 of file SmoothValue.h.

template<typename T >
StiffValue< T >::StiffValue ( d)
inline

Definition at line 73 of file SmoothValue.h.

template<typename T >
StiffValue< T >::StiffValue ( d,
initialValue 
)
inline

Definition at line 75 of file SmoothValue.h.

Member Function Documentation

template<typename T >
T StiffValue< T >::getValue ( )
inline

Definition at line 84 of file SmoothValue.h.

Referenced by StiffValue< T >::operator T().

template<>
float StiffValue< float >::normal ( float  delta)

Definition at line 60 of file SmoothValue.cpp.

template<>
int StiffValue< int >::normal ( float  delta)

Definition at line 65 of file SmoothValue.cpp.

template<typename T >
static T StiffValue< T >::normal ( float  delta)
static
template<typename T >
StiffValue< T >::operator T ( )
inline

Definition at line 107 of file SmoothValue.h.

References StiffValue< T >::getValue().

template<typename T >
StiffValue<T>& StiffValue< T >::operator*= ( const T &  other)
inline

Definition at line 99 of file SmoothValue.h.

References StiffValue< T >::update().

template<typename T >
StiffValue<T>& StiffValue< T >::operator+= ( const T &  other)
inline

Definition at line 91 of file SmoothValue.h.

References StiffValue< T >::update().

template<typename T >
StiffValue<T>& StiffValue< T >::operator-= ( const T &  other)
inline

Definition at line 95 of file SmoothValue.h.

References StiffValue< T >::update().

template<typename T >
StiffValue<T>& StiffValue< T >::operator/= ( const T &  other)
inline

Definition at line 103 of file SmoothValue.h.

References StiffValue< T >::update().

template<typename T >
StiffValue<T>& StiffValue< T >::operator= ( const T &  other)
inline

Definition at line 87 of file SmoothValue.h.

References StiffValue< T >::update().

template<typename T >
void StiffValue< T >::reset ( newValue)
inline

Definition at line 81 of file SmoothValue.h.

template<typename T >
void StiffValue< T >::update ( newValue)
inline

Field Documentation

template<typename T >
T StiffValue< T >::delta

Definition at line 70 of file SmoothValue.h.

Referenced by StiffValue< T >::update().


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