These are from algebra.Monoid
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.
This monoid stems from the fact that if X and Y are independent random variables that are normally distributed, then their sum is also normally distributed, with its new mean equal to the sum of two means and variance equal to the sum of two variances. http://en.wikipedia.org/wiki/Sum_of_normally_distributed_random_variables