pushHeap

Adds val to buf by appending it and adjusting it up the heap.

  1. void pushHeap(Elem[] buf, Elem val, Pred2E pred)
    version(TangoDoc)
    void
    pushHeap
  2. template pushHeap(Buf, Val)
  3. template pushHeap(Buf, Val, Pred)

Parameters

buf Elem[]

The heap to modify. This parameter is marked 'ref' because buf.length will be altered.

val Elem

The element to push onto buf.

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.

Meta