Logos DX
    Preparing search index...

    Interface PriorityQueueOptions<T>

    interface PriorityQueueOptions<T> {
        compare?: (a: Node<T>, b: Node<T>) => number;
        lifo?: boolean;
        maxHeap?: boolean;
    }

    Type Parameters

    • T
    Index

    Properties

    compare?: (a: Node<T>, b: Node<T>) => number

    The compare function to use for sorting the queue.

    (a, b) => a.priority - b.priority
    
    lifo?: boolean

    When true, items with equal priority are dequeued in LIFO order (newest first). When false (default), items with equal priority are dequeued in FIFO order (oldest first).

    maxHeap?: boolean

    Invert the priority order.

    false