The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
minmaxPos.minmaxPos
mir
algorithm
iteration
minmaxPos
template
minmaxPos
(alias pred = "a < b")
@
fmamath
static if
(
__traits(isSame, naryFun!pred, pred)
)
@
fmamath
Slice
!(
Iterator
,
N
,
kind
==
Contiguous
&&
N
> 1
?
Canonical
:
kind
)[2]
minmaxPos
(
Iterator
size_t
N
SliceKind
kind
)
(
Slice
!(
Iterator
,
N
,
kind
)
slice
)
Parameters
slice
Slice
!(
Iterator
,
N
,
kind
)
ndslice.
Return Value
Type:
Slice
!(
Iterator
,
N
,
kind
==
Contiguous
&&
N
> 1
?
Canonical
:
kind
)[2]
2 subslices with minimal and maximal
first
elements.
Meta
Source
See Implementation
mir
algorithm
iteration
minmaxPos
functions
minmaxPos