phasedb v0.0.2 PhaseDB.Aggregates
Statistical functions which work on enumerables and reduce values.
Summary
Functions
Return the average of a stream of numbers
Return the number of elements in the enumerable
Return a list of unique elements in the enumerable
Return the first value(s) for a stream
Return the last value(s) for a stream
Return the largest value(s) for a stream
Quickly find the median of a stream of numbers
Return the smallest value(s) for a stream
Returns the nth percentile of a stream
Sum the elements in the enumerable
Functions
Specs
count(Enum.t) :: number
Return the number of elements in the enumerable.
Delegates to Enum.count
.
Return a list of unique elements in the enumerable.
Delegates to Enum.uniq
.
Return the first value(s) for a stream.
Delegates to Enum.take
.
Return the last value(s) for a stream.
Returns them in reverse order.
Return the largest value(s) for a stream.
Return the smallest value(s) for a stream.
Specs
percentile(Enum.t, number) :: number
Returns the nth percentile of a stream.
Here percentage is expected as a number between 0 and 1.
Note that the 50th percentile is the median and median
will calculate this special case much more efficiently.