medianPartition

Median finding as in median(), but will partition input data such that elements less than the median will have smaller indices than that of the median, and elements larger than the median will have larger indices than that of the median. Useful both for its partititioning and to avoid memory allocations. Requires a random access range with swappable elements.

double
medianPartition
(
T
)
()
if (
isRandomAccessRange!(T) &&
is(ElementType!(T) : double)
&&
hasSwappableElements!(T)
&&
hasLength!(T)
)

Meta