1#include <boost/accumulators/accumulators.hpp>
2#include <boost/accumulators/statistics.hpp>
3#include <boost/accumulators/statistics/sum_kahan.hpp>
11 using Acc = boost::accumulators::accumulator_set<double, boost::accumulators::stats<boost::accumulators::tag::sum_kahan>>;
42 return boost::accumulators::sum_kahan(
acc);
46 operator double()
const
An accurate aggregator for doubles with usability in mind.
boost::accumulators::accumulator_set< double, boost::accumulators::stats< boost::accumulators::tag::sum_kahan > > Acc
This class is mainly a wrapper for boost's Kahan accumulator which implements the Kahan summation alg...
void operator-=(double d)
Natural version of subtracting a value.
void operator+=(double d)
Natural version of adding a value.
double value() const
Retrieves the corrected sum.
void add(double d)
Adds a value to the aggregator.
void operator=(double d)
Sets the aggregator to a value.
contains precice-related utilities.
DoubleAggregator operator+(double lhs, DoubleAggregator rhs)
DoubleAggregator operator-(DoubleAggregator lhs, double rhs)