preCICE v3.1.2
|
An accurate aggregator for doubles with usability in mind. More...
#include <DoubleAggregator.hpp>
Public Member Functions | |
void | operator= (double d) |
Sets the aggregator to a value. | |
void | add (double d) |
Adds a value to the aggregator. | |
void | operator+= (double d) |
Natural version of adding a value. | |
void | operator-= (double d) |
Natural version of subtracting a value. | |
double | value () const |
Retrieves the corrected sum. | |
operator double () const | |
Allows implicit casting to a double. | |
Private Types | |
using | Acc = boost::accumulators::accumulator_set<double, boost::accumulators::stats<boost::accumulators::tag::sum_kahan>> |
This class is mainly a wrapper for boost's Kahan accumulator which implements the Kahan summation algorithm (see https://en.wikipedia.org/wiki/Kahan_summation_algorithm) | |
Private Attributes | |
Acc | acc |
An accurate aggregator for doubles with usability in mind.
Definition at line 8 of file DoubleAggregator.hpp.
|
private |
This class is mainly a wrapper for boost's Kahan accumulator which implements the Kahan summation algorithm (see https://en.wikipedia.org/wiki/Kahan_summation_algorithm)
Definition at line 11 of file DoubleAggregator.hpp.
|
inline |
Adds a value to the aggregator.
Definition at line 22 of file DoubleAggregator.hpp.
|
inline |
Allows implicit casting to a double.
Definition at line 46 of file DoubleAggregator.hpp.
|
inline |
Natural version of adding a value.
Definition at line 28 of file DoubleAggregator.hpp.
|
inline |
Natural version of subtracting a value.
Definition at line 34 of file DoubleAggregator.hpp.
|
inline |
Sets the aggregator to a value.
Definition at line 15 of file DoubleAggregator.hpp.
|
inline |
Retrieves the corrected sum.
Definition at line 40 of file DoubleAggregator.hpp.
|
private |
Definition at line 52 of file DoubleAggregator.hpp.