Public Member Functions | Private Attributes | List of all members
tuw::Integrator Class Reference

Minimal class performing numerically stable integration (using the Kahan summation algorithm). More...

#include <integrator.hpp>

Inheritance diagram for tuw::Integrator:
Inheritance graph
[legend]

Public Member Functions

void integrate (const double &_dx)
 Addds a new value to the integrated value. More...
 
 Integrator ()=default
 
 Integrator (const Integrator &)=default
 
 Integrator (Integrator &&)=default
 
const double & intOutput () const
 Returns the integrator value. More...
 
Integratoroperator= (const Integrator &)=default
 
Integratoroperator= (Integrator &&)=default
 
void reset (const double &_x0)
 resets the integrated value and compensation variable. More...
 
virtual ~Integrator ()=default
 

Private Attributes

double comp_
 Summation compensation variable. More...
 
double x_
 Integrated value. More...
 

Detailed Description

Minimal class performing numerically stable integration (using the Kahan summation algorithm).

Definition at line 44 of file integrator.hpp.

Constructor & Destructor Documentation

◆ Integrator() [1/3]

tuw::Integrator::Integrator ( )
default

◆ ~Integrator()

virtual tuw::Integrator::~Integrator ( )
virtualdefault

◆ Integrator() [2/3]

tuw::Integrator::Integrator ( const Integrator )
default

◆ Integrator() [3/3]

tuw::Integrator::Integrator ( Integrator &&  )
default

Member Function Documentation

◆ integrate()

void tuw::Integrator::integrate ( const double &  _dx)
inline

Addds a new value to the integrated value.

Parameters
_dxAdded value

Definition at line 86 of file integrator.hpp.

◆ intOutput()

const double& tuw::Integrator::intOutput ( ) const
inline

Returns the integrator value.

Returns
Const reference to integrated value.

Definition at line 78 of file integrator.hpp.

◆ operator=() [1/2]

Integrator& tuw::Integrator::operator= ( const Integrator )
default

◆ operator=() [2/2]

Integrator& tuw::Integrator::operator= ( Integrator &&  )
default

◆ reset()

void tuw::Integrator::reset ( const double &  _x0)
inline

resets the integrated value and compensation variable.

Parameters
_x0Value the integrator is resetted to

Definition at line 69 of file integrator.hpp.

Member Data Documentation

◆ comp_

double tuw::Integrator::comp_
private

Summation compensation variable.

Definition at line 97 of file integrator.hpp.

◆ x_

double tuw::Integrator::x_
private

Integrated value.

Definition at line 95 of file integrator.hpp.


The documentation for this class was generated from the following file:


tuw_control
Author(s): George Todoran
autogenerated on Mon Feb 28 2022 23:52:16