The OpenD Programming Language

median

Computes the median of slice.

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.

Can also pass a boolean variable, allowModify, that allows the input slice to be modified. By default, a reference-counted copy is made.

  1. meanType!(Slice!(Iterator, N, kind)) median(Slice!(Iterator, N, kind) slice)
    template median(bool allowModify = false)
    meanType!(Slice!(Iterator, N, kind))
    median
    (
    Iterator
    size_t N
    SliceKind kind
    )
    (
    Slice!(Iterator, N, kind) slice
    )
  2. template median(F, bool allowModify = false)
  3. meanType!(T[]) median(T[] ar)
  4. auto median(T sliceLike)

Members

Functions

median
meanType!(Slice!(Iterator, N, kind)) median(Slice!(Iterator, N, kind) slice)

Returns the element type of a struct with .DeepElement inner alias or a type of common array. Returns ForeachType if struct does not have .DeepElement member.

Parameters

allowModify

Allows the input slice to be modified, default is false

Return Value

the median of the slice

See Also

Meta