includes

Performs a parallel linear scan of setA and setB from [0 .. N$(RP) where N = min(setA.length, setB.length), returning true if setA includes all elements in setB and false if not. Both setA and setB are required to be sorted, and duplicates in setB require an equal number of duplicates in setA. Comparisons will be performed using the supplied predicate or '<' if none is supplied.

  1. bool includes(Elem[] setA, Elem[] setB, Pred2E pred)
    version(TangoDoc)
    bool
    includes
  2. template includes(BufA, BufB)
  3. template includes(BufA, BufB, Pred)

Parameters

setA Elem[]

The sorted array to evaluate.

setB Elem[]

The sorted array to match against.

pred Pred2E

The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type.

Return Value

Type: bool

True if setA includes all elements in setB, false if not.

Meta