Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
qlibs::smootherMOR1 Class Reference

A Moving Outlier Removal filter. More...

#include <smoother.hpp>

Inheritance diagram for qlibs::smootherMOR1:
qlibs::smoother

Public Member Functions

virtual ~smootherMOR1 ()
 
bool setup (real_t *window, const size_t w_size, const real_t a=0.9_re)
 Setup an initialize the Moving Outlier Removal filter.
 
template<size_t windowSize>
bool setup (real_t(&window)[windowSize], const real_t a=0.9_re)
 Setup an initialize the Moving Outlier Removal filter.
 
real_t smooth (const real_t x) override
 Perform the smooth operation recursively for the input signal x.
 
- Public Member Functions inherited from qlibs::smoother
virtual ~smoother ()
 
bool isInitialized (void) const
 Check if the smoother filter has been initialized using setup().
 
 operator bool () const noexcept
 Check if the smoother filter has been initialized using setup().
 
bool reset (void)
 Reset the smoother filter.
 

Detailed Description

A Moving Outlier Removal filter.

Note
Time complexity is O(n)

Constructor & Destructor Documentation

◆ ~smootherMOR1()

virtual qlibs::smootherMOR1::~smootherMOR1 ( )
inlinevirtual

Member Function Documentation

◆ setup() [1/2]

bool smootherMOR1::setup ( real_t * window,
const size_t w_size,
const real_t a = 0.9_re )

Setup an initialize the Moving Outlier Removal filter.

Parameters
[in]windowAn array to hold the samples of the window
[in]w_sizeThe number of elements in window
[in]aA value to adjust the filter behavior
Returns
true on success, otherwise return false.

◆ setup() [2/2]

template<size_t windowSize>
bool qlibs::smootherMOR1::setup ( real_t(&) window[windowSize],
const real_t a = 0.9_re )
inline

Setup an initialize the Moving Outlier Removal filter.

Parameters
[in]windowAn array to hold the samples of the window
[in]aA value to adjust the filter behavior
Returns
true on success, otherwise return false.

◆ smooth()

real_t smootherMOR1::smooth ( const real_t x)
overridevirtual

Perform the smooth operation recursively for the input signal x.

Precondition
Instance must be previously initialized
Parameters
[in]xA sample of the input signal.
Returns
The smoothed output.

Implements qlibs::smoother.