Description
It would be useful to have simple accumulator classes in Summation and LinearCombination to perform extended precision operations on arbitrary collections of values without requiring conversion to double[]. Ex:
Summation.Accumulator sum= Summation.accumulator(1d); sum.add(x) .add(y) .add(z) .add(w); double sumResult = sum.get(); LinearCombination.Accumulator comb = LinearCombination.accumulator(1d); comb.add(x, scale) .add(y, scale) .add(z, scale) .add(w, scale); double combResult = comb.get();