Finds a backward indices such that slice[indices[0]] is minimal and slice[indices[1]] is maximal elements in the slice.
A predicate.
import mir.ndslice.slice: sliced; auto s = [ 2, 6, 4, -3, 0, -4, -3, 3, -3, -2, 7, 8, ].sliced(3, 4); auto indices = s.minmaxIndex; assert(indices == [[1, 1], [2, 3]]); assert(s[indices[0]] == -4); assert(s[indices[1]] == 8);
minmaxIndex, minPos, maxPos, mir.ndslice.slice.Slice.backward.
See Implementation
Finds a backward indices such that slice[indices[0]] is minimal and slice[indices[1]] is maximal elements in the slice.