These are from algebra.Monoid
The algorithm for combining the correlation calculations from two partitions of pairs of numbers.
The algorithm for combining the correlation calculations from two partitions of pairs of numbers. Comes from Pébay, Philippe (2008), "Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments", Technical Report SAND2008-6212, Sandia National Laboratories https://prod-ng.sandia.gov/techlib-noauth/access-control.cgi/2008/086212.pdf
Extending this to weights can be found in Schubert, Erich; Gertz, Michael (9 July 2018). Numerically stable parallel computation of (co-)variance. ACM. p. 10. doi:10.1145/3221269.3223036. ISBN 9781450365055. http://dl.acm.org/citation.cfm?id=3221269.3223036 https://dl.acm.org/doi/10.1145/3221269.3223036
Returns an instance of
T calculated by summing all instances in iter in one pass.
Returns an instance of
T calculated by summing all instances in iter in one pass. Returns None if
iter is empty, else Some[
T].
None if iter is empty, else an option value containing the summed
T
Override if there is a faster way to compute this sum than iter.reduceLeftOption using plus.