priorityqueue
    Preparing search index...

    Class default<T>

    An implementation of Binary Heap.

    Type Parameters

    • T

    Hierarchy

    • BasePriorityQueue
      • default

    Implements

    Index

    Constructors

    Properties

    _kind: string
    collection: T[] = []
    comparator: Comparator<T>

    Accessors

    • get length(): number

      Returns size of the priority queue.

      Returns number

    Methods

    • Clear this priority queue.

      Returns void

    • Returns the priority queue is empty or not.

      Returns boolean

    • Pop the top element of the priority queue.

      Returns T

    • Push the element to the priority queue and returns self.

      Parameters

      • value: T

      Returns void

    • Write out the priority queue content as an Array.

      Returns T[]

    • Get the top element of the priority queue.

      Returns T