public class KahanSum
Kahan-Babuska summation.
See https://en.wikipedia.org/wiki/Kahan_summation_algorithm for details.
| Constructor and Description |
|---|
KahanSum(double accumulator)
Kahan-Babuska summation.
|
KahanSum()
Kahan-Babuska summation.
|
| Modifier and Type | Method and Description |
|---|---|
KahanSum |
feed(double value)
Supplies a number to be added to the accumulator.
|
void |
plusAssign(double value) |
double |
result()
Returns the sum accumulated so far.
|
@JvmOverloads public KahanSum(double accumulator)
Kahan-Babuska summation.
See https://en.wikipedia.org/wiki/Kahan_summation_algorithm for details.
@JvmOverloads public KahanSum()
Kahan-Babuska summation.
See https://en.wikipedia.org/wiki/Kahan_summation_algorithm for details.
@NotNull public KahanSum feed(double value)
Supplies a number to be added to the accumulator.
public void plusAssign(double value)
public double result()
Returns the sum accumulated so far.