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

Double exponential smoothing (Holt’s Method) More...

#include <smoother.hpp>

Inheritance diagram for qlibs::smootherDESF:
qlibs::smoother

Public Member Functions

virtual ~smootherDESF ()
 
bool setup (const real_t a, const real_t b, const size_t nS)
 Setup an initialize the Double exponential smoothing instance.
 
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

Double exponential smoothing (Holt’s Method)

Constructor & Destructor Documentation

◆ ~smootherDESF()

virtual qlibs::smootherDESF::~smootherDESF ( )
inlinevirtual

Member Function Documentation

◆ setup()

bool smootherDESF::setup ( const real_t a,
const real_t b,
const size_t nS )

Setup an initialize the Double exponential smoothing instance.

Parameters
[in]aWeight for the level [ 0 < a < 1 ]
[in]bWeight for the trend [ 0 < b < 1 ]
[in]nSNumber of steps for the forecast
Returns
true on success, otherwise return false.

◆ smooth()

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