assumeSortedContains

  1. bool assumeSortedContains(Slice!(Iterator, 1, kind) slice, V v)
    template assumeSortedContains(alias test = "a < b")
    @optmath
    static if(__traits(isSame, naryFun!test, test))
    @optmath
    bool
    assumeSortedContains
    (
    Iterator
    SliceKind kind
    V
    )
    (
    auto ref Slice!(Iterator, 1, kind) slice
    ,
    auto ref scope const V v
    )
  2. bool assumeSortedContains(T[] ar, V v)
  3. alias assumeSortedContains = .assumeSortedContains!(naryFun!test)

Members

Aliases

assumeSortedContains
alias assumeSortedContains = .assumeSortedContains!(naryFun!test)
Undocumented in source.

Functions

assumeSortedContains
bool assumeSortedContains(T[] ar, V v)
assumeSortedContains
bool assumeSortedContains(Slice!(Iterator, 1, kind) slice, V v)

Parameters

test

strict ordering symmetric predicate

For non-symmetric predicates please use a structure with two opCalls or an alias of two global functions, that correponds to (array[i], value) and (value, array[i]) cases.

Return Value

true if a sorted array contains the value.

See Also

Meta