Class to add numbers using Kahan summation [15].
More...
#include <num_collect/util/kahan_adder.h>
template<concepts::kahan_addable T>
class num_collect::util::kahan_adder< T >
Class to add numbers using Kahan summation [15].
- Template Parameters
-
- Examples
- util/kahan_adder.cpp.
Definition at line 32 of file kahan_adder.h.
◆ kahan_adder() [1/2]
template<concepts::kahan_addable T>
Constructor.
- Note
- This won't work for Eigen's vectors and matrices. Use another constructor for them.
Definition at line 40 of file kahan_adder.h.
◆ kahan_adder() [2/2]
template<concepts::kahan_addable T>
Construct with zero number.
This constructor is useful for Eigen's vectors and matrices.
- Parameters
-
Definition at line 49 of file kahan_adder.h.
◆ add()
template<concepts::kahan_addable T>
Add a number.
- Parameters
-
- Returns
- This.
Definition at line 58 of file kahan_adder.h.
◆ operator T()
template<concepts::kahan_addable T>
◆ operator+=()
template<concepts::kahan_addable T>
Add a number.
- Parameters
-
- Returns
- This.
Definition at line 86 of file kahan_adder.h.
◆ operator-=()
template<concepts::kahan_addable T>
Subtract a number.
- Parameters
-
- Returns
- This.
Definition at line 97 of file kahan_adder.h.
◆ sub()
template<concepts::kahan_addable T>
Subtract a number.
- Parameters
-
- Returns
- This.
Definition at line 72 of file kahan_adder.h.
◆ sum()
template<concepts::kahan_addable T>
◆ prev_sum_
template<concepts::kahan_addable T>
◆ rem_
template<concepts::kahan_addable T>
◆ sum_
template<concepts::kahan_addable T>
The documentation for this class was generated from the following file: