These are from algebra.Monoid
Given two streams of doubles (n, an) and (k, ak) of form (count, mean), calculates the mean of the combined stream.
Given two streams of doubles (n, an) and (k, ak) of form (count, mean), calculates the mean of the combined stream.
Uses a more stable online algorithm which should be suitable for large numbers of records similar to: http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
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]
.
instances of T
to be combined
None
if iter
is empty, else an option value containing the summed T
A monoid to perform moment calculations.