Cosmos Journeyer API Documentation - v1.10.1
    Preparing search index...

    Class PriorityQueue<T>

    Priority queue implementation using a binary heap

    Type Parameters

    • T
    Index

    Constructors

    Methods

    • Returns the first element in the queue that satisfies the provided testing function. Otherwise, undefined is returned.

      Parameters

      • predicate: (value: T) => boolean

        A function to test each element of the queue

      Returns undefined | T

    • Adds one or more elements to the queue

      Parameters

      • ...values: T[]

        The elements to add to the queue

      Returns number

      The new size of the queue