numir.stats

Various statistics functions on ndslice. (e.g., bincount, var, logsumexp)

Members

Enums

isBincountable
eponymoustemplate isBincountable(T)

bincountable type is a one-dimentional slice with unsigned elements

Functions

bincount
auto bincount(T xs, size_t minlength)

Count number of occurrences of each value in slice of non-negative ints.

bincount
auto bincount(T xs, W weights, size_t minlength)

Count weighted number of occurrences of each value in slice of non-negative ints. Note that empty weight causes compiler error.

gmean
deprecated auto gmean(S slice)

Computes the geometric mean of a slice. The product in gmean is computed in logarithms to avoid FP overflows.

gmean
deprecated auto gmean(S slice, Seed seed)

Computes the geometric mean of a slice.

mean
deprecated auto mean(S slice)
Undocumented in source. Be warned that the author may not have intended to support it.
mean
deprecated auto mean(S slice, Seed seed)
Undocumented in source. Be warned that the author may not have intended to support it.
median
auto median(S x)
Undocumented in source.

Templates

center
deprecated template center(sumTemplateArgs...)

Lazily centers a slice.

hmean
deprecated template hmean(sumTemplateArgs...)

Computes the harmonic mean of a slice.

logsumexp
template logsumexp(sumTemplateArgs...)

Computes the log of the sum of exponentials of input elements.

mean
deprecated template mean(sumTemplateArgs...)
Undocumented in source.
moment
template moment(sumTemplateArgs...)

Computes the n-th central moment of a slice.

std
deprecated template std(sumTemplateArgs...)

Computes the standard deviation of a slice.

var
deprecated template var(sumTemplateArgs...)

Computes the variance of a slice.

zscore
template zscore(sumTemplateArgs...)

Computes the zscore of a slice.

Meta