Loading...
Searching...
No Matches
eonc::tunneling::DerivativeRbfModel::Sum Struct Reference

Compensated accumulation retains small terms beside cancelling weights. More...

Public Member Functions

void add (long double term)
long double total () const

Public Attributes

long double value = 0
long double correction = 0

Detailed Description

Compensated accumulation retains small terms beside cancelling weights.

Definition at line 125 of file DerivativeRbfModel.h.

Member Function Documentation

◆ add()

void eonc::tunneling::DerivativeRbfModel::Sum::add ( long double term)
inline

Definition at line 127 of file DerivativeRbfModel.h.

127 {
128 const long double next = value + term;
129 correction += std::abs(value) >= std::abs(term) ? (value - next) + term
130 : (term - next) + value;
131 value = next;
132 }

◆ total()

long double eonc::tunneling::DerivativeRbfModel::Sum::total ( ) const
inline

Definition at line 133 of file DerivativeRbfModel.h.

133{ return value + correction; }

Member Data Documentation

◆ correction

long double eonc::tunneling::DerivativeRbfModel::Sum::correction = 0

Definition at line 126 of file DerivativeRbfModel.h.

◆ value

long double eonc::tunneling::DerivativeRbfModel::Sum::value = 0

Definition at line 126 of file DerivativeRbfModel.h.


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