@ac-essentials/misc-util
    Preparing search index...

    Class BinaryHeap<T>

    A binary heap implementation.

    Type Parameters

    • T

      The type of elements in the heap.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    capacity: number = Infinity

    The maximum number of elements the collection can hold. If the collection is unbounded, this will be Infinity.

    data: NativeArray<T>
    isItemOrdered: Predicate<[T, T]>

    Methods

    • Same as insert, but waits for capacity if the operation would exceed it.

      Parameters

      • items: Iterable<T>
      • Optionalsignal: null | AbortSignal

        Optional abort signal to cancel the operation.

      Returns Promise<void>

      IHeap.insert