range. If the
range is empty, -1 is returned.
Limitations: If at least one of the arguments is NaN, the result is an unspecified value. See maxElement for examples on how to cope with NaNs.
ptrdiff_t minIndex(alias pred = "a < b", Range)(Range range) if (isInputRange!Range && !isInfinite!Range &&
is(typeof(binaryFun!pred(range.front, range.front))))Computes the index of the first occurrence of range's minimum element.
pred | The ordering predicate to use to determine the minimum element. |
range | The input range to search. Complexity: range.length Exactly range.length - 1 comparisons are needed. |
range. If the
range is empty, -1 is returned.
Limitations: If at least one of the arguments is NaN, the result is an unspecified value. See maxElement for examples on how to cope with NaNs.