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

A Gaussian filter. More...

#include <smoother.hpp>

Inheritance diagram for qlibs::smootherGMWF:
qlibs::smoother

Public Member Functions

virtual ~smootherGMWF ()
 
bool setup (const real_t sg, const real_t c, real_t *window, real_t *kernel, const size_t wk_size)
 Setup an initialize the Gaussian filter.
 
template<size_t windowAndKernelSize>
bool setup (const real_t sg, const real_t c, real_t(&window)[windowAndKernelSize], real_t(&kernel)[windowAndKernelSize])
 Setup an initialize the Gaussian 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 Gaussian filter.

Constructor & Destructor Documentation

◆ ~smootherGMWF()

virtual qlibs::smootherGMWF::~smootherGMWF ( )
inlinevirtual

Member Function Documentation

◆ setup() [1/2]

bool smootherGMWF::setup ( const real_t sg,
const real_t c,
real_t * window,
real_t * kernel,
const size_t wk_size )

Setup an initialize the Gaussian filter.

Parameters
[in]sgStandard deviation [ sigma > 0 ]
[in]cOffset of the gaussian center [ 0 < offset < ( wsize - 1 ) ]
[in]windowAn array to hold the samples of the window
[in]kernelAn array to hold the gaussian kernel coefficients.
[in]wk_sizeThe number of elements in window or kernel.
Note
Size of both window and kernel should be equal
Returns
true on success, otherwise return false.

◆ setup() [2/2]

template<size_t windowAndKernelSize>
bool qlibs::smootherGMWF::setup ( const real_t sg,
const real_t c,
real_t(&) window[windowAndKernelSize],
real_t(&) kernel[windowAndKernelSize] )
inline

Setup an initialize the Gaussian filter.

Parameters
[in]sgStandard deviation [ sigma > 0 ]
[in]cOffset of the gaussian center [ 0 < offset < ( wsize - 1 ) ]
[in]windowAn array to hold the samples of the window
[in]kernelAn array to hold the gaussian kernel coefficients.
Note
Size of both window and kernel should be equal
Returns
true on success, otherwise return false.

◆ smooth()

real_t smootherGMWF::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.