SoftFilters
0.1.0
Arduino framework and library of software data filters.
|
A moving variance filter. More...
#include <SoftFilters.h>
Public Member Functions | |
MovingVarianceFilter (size_t w_sz) | |
![]() | |
MovingAverageFilter (size_t w_sz) | |
Create a moving average filter with the specified window size. More... | |
![]() | |
CachedFilter (size_t cap) | |
![]() | |
bool | push (void const *const input, void *const output) |
Push a new data through the filter. More... | |
Protected Member Functions | |
INTERNAL_T | get_squared_sum () |
virtual bool | refresh (IN_T const *const new_val, IN_T const *const old_val, OUT_T &output) override |
Refresh the output value given the new value added to the cache and the old value removed from the cache. More... | |
![]() | |
INTERNAL_T | get_sum () |
![]() | |
virtual bool | update (void const *const input) override |
Internally update the filter output based on the given input. More... | |
size_t | get_capacity () |
size_t | get_size () |
![]() | |
virtual void const *const | get_output_val_ptr () final |
Push a new data through the filter. More... | |
virtual void | copy_to_client (void *const output) final |
Copy the output to client memory. | |
Private Attributes | |
INTERNAL_T | new_val_2 |
square of the new data | |
INTERNAL_T | old_val_2 |
square of the old data | |
INTERNAL_T | squared_sum |
squared sum | |
Additional Inherited Members | |
![]() | |
INTERNAL_T | internal_result |
representing the result in internal type in case the output type does not have the required precision | |
![]() | |
OUT_T | out_val |
Internally managed storage of the output value. | |
A moving variance filter.
|
inlineoverrideprotectedvirtual |
Refresh the output value given the new value added to the cache and the old value removed from the cache.
Reimplemented from MovingAverageFilter< IN_T, OUT_T, INTERNAL_T >.