Creates an Option[Statistics] from a sequence of Double values. If the sequence is empty, returns None. If the sequence contains one value, returns a Statistics instance with zero standard deviation and the same value for min and max. If the sequence contains more than one value, delegates to a private method to calculate the statistics.
Creates an Option[Statistics] from a sequence of Double values. If the sequence is empty, returns None. If the sequence contains one value, returns a Statistics instance with zero standard deviation and the same value for min and max. If the sequence contains more than one value, delegates to a private method to calculate the statistics.
Value parameters
xs
a sequence of Double values from which to compute statistics.
Attributes
Returns
an Option[Statistics] containing the computed statistics if the sequence is non-empty, or None if the sequence is empty.