My Project
Public Member Functions
KahanSum Class Reference

List of all members.

Public Member Functions

double operator() (double &s, const double &d)

Detailed Description

function class to calculate summation with Kahan's algorithm http://en.wikipedia.org/wiki/Kahan_summation_algorithm


Member Function Documentation

double KahanSum::operator() ( double &  s,
const double &  d 
) [inline]

performs Kahan's Compensated Summation; it is designed to used from accumulate() as a function object

Parameters:
sinitial value
dvalue to add to s
Returns:
summation result

The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends