![]() |
My Project
|
Filter is pure virtual class describing the basic virtual interface for all filters More...
#include <Filter.h>
Public Member Functions | |
Filter () | |
Constructor. | |
double | get () const |
Get the latest value. | |
operator double () | |
Get the latest value. | |
virtual double | next (double y)=0 |
Update the value. All inherited classes need to update value in next(). | |
virtual void | reset ()=0 |
Reset the filter state. | |
Protected Attributes | |
double | value |
Filter is pure virtual class describing the basic virtual interface for all filters
Basic usage:
The Filter library provides also the assignment operators (operator=) to simplify the process where you want to replace existing double's in code with filtered values. For example if you want to filter the d over time in the following code...
...you can add filter just by replacing the double with the selected filter:
However, using the assignment operator for setting time series data is a little counter-intuitive, so please use next() instead when possible.