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

tuw::Integrator::Integrator ( )
default
virtual tuw::Integrator::~Integrator ( )
virtualdefault
tuw::Integrator::Integrator ( const Integrator )
default
tuw::Integrator::Integrator ( Integrator &&  )
default

Member Function Documentation

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.

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.

Integrator& tuw::Integrator::operator= ( const Integrator )
default
Integrator& tuw::Integrator::operator= ( Integrator &&  )
default
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

double tuw::Integrator::comp_
private

Summation compensation variable.

Definition at line 97 of file integrator.hpp.

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 Jun 10 2019 15:27:23