YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
CompensatedSum< T > Struct Template Reference

Struct to calculate a compensated sum using the Kahan summation algorithm. More...

#include <CompensatedSum.h>

Public Member Functions

 CompensatedSum (T val=0)
 constructor
 
 operator T () const
 
CompensatedSumoperator+= (typename std::conditional< std::is_fundamental< T >::value, const T, const T & >::type value)
 addition assignment operator
 

Public Attributes

sum
 sum
 
correction
 correction to sum
 

Detailed Description

template<typename T>
struct yap::CompensatedSum< T >

Struct to calculate a compensated sum using the Kahan summation algorithm.

Author
Johannes Rauch, Daniel Greenwald

Member Function Documentation

operator T ( ) const
inline

(implicit) cast operator

Returns
sum

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