The OpenD Programming Language

quantile

Computes the quantile(s) of the input, given one or more probabilities p.

By default, if p is a $(NDSLICEREF slice, Slice), built-in dynamic array, or type with asSlice, then the output type is a reference-counted copy of the input. A compile-time parameter is provided to instead overwrite the input in-place.

For all QuantileAlgo except QuantileAlgo.type1 and QuantileAlgo.type3, by default, if F is not floating point type or complex type, then the result will have a double type if F is implicitly convertible to a floating point type or a type for which isComplex!F is true.

For QuantileAlgo.type1 and QuantileAlgo.type3, the return type is the $(MATHREF sum, elementType) of the input.

Members

Functions

quantile
quantileType!(F, quantileAlgo) quantile(Slice!(Iterator, N, kind) slice, G p)
quantile
auto quantile(Slice!(IteratorA, N, kindA) slice, Slice!(IteratorB, 1, kindB) p)
auto quantile(Slice!(Iterator, N, kind) slice, F[] p)
auto quantile(SliceLike x, G p)
auto quantile(SliceLikeX x, SliceLikeP p)

Parameters

F

controls type of output

quantileAlgo

algorithm for calculating quantile (default: QuantileAlgo.type7)

allowModifySlice

controls whether the input is modified in place, default is false

Return Value

The quantile of all the elements in the input at probability p.

See Also

median, $(MATHREF sum, partitionAt), $(MATHREF sum, elementType)

Meta