Distribution

Class to report on the distribution of a series of values.

Template params: T = The type of the values in the distribution

Constructors

this
this(size_t num_values)

Constructor.

Members

Aliases

length
alias length = count
Undocumented in source.

Functions

clear
void clear()

Clears all values from the list.

count
ulong count()
greaterThanCount
size_t greaterThanCount(T min)

Gets the count of values in the list which are greater than the specified value.

lessThanCount
size_t lessThanCount(T max)

Gets the count of values in the list which are less than the specified value.

mean
double mean()

Calculates the mean (average) value of this distribution

median
double median()

Calculates the median value of this distribution For an odd number of values, the middle value is returned For an even number, the average of the 2 middle values is returned

opOpAssign
void opOpAssign(T value)

Adds a value to the list.

percentValue
T percentValue(double fraction)

Gets the value which X% of the values in the list are less than or equal to.

Meta