X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FPriorityQueueNode.html;h=383789f39e2da4fbc4192a943b9a80e8b40788c1;hb=0aa00166eaa9a8c9b505b4fa7fd5dc50d831b7ef;hp=cb83524c685f84c10ab7f2b87d889a141be19d7c;hpb=67c6a853287d5c2df8ab115905b714e644333802;p=poolifier.git diff --git a/docs/interfaces/PriorityQueueNode.html b/docs/interfaces/PriorityQueueNode.html index cb83524c..383789f3 100644 --- a/docs/interfaces/PriorityQueueNode.html +++ b/docs/interfaces/PriorityQueueNode.html @@ -1,5 +1,35 @@ -PriorityQueueNode | poolifier - v4.0.9

Interface PriorityQueueNode<T>Internal

Priority queue node.

-
interface PriorityQueueNode<T> {
    data: T;
    priority: number;
}

Type Parameters

  • T

    Type of priority queue node data.

    -

Properties

Properties

data: T
priority: number
\ No newline at end of file +PriorityQueueNode | poolifier - v4.0.15

Interface PriorityQueueNode<T>Internal

Priority queue node.

+
interface PriorityQueueNode<T> {
    capacity: number;
    enablePriority: boolean;
    next?: FixedPriorityQueue<T>;
    size: number;
    [iterator](): Iterator<T, any, undefined>;
    clear(): void;
    dequeue(): undefined | T;
    empty(): boolean;
    enqueue(data: T, priority?: number): number;
    full(): boolean;
    get(index: number): undefined | T;
}

Type Parameters

  • T

    Type of priority queue node data.

    +

Hierarchy (view full)

Properties

capacity: number

The fixed priority queue capacity.

+
enablePriority: boolean

Whether to enable priority.

+
size: number

The fixed priority queue size.

+

Methods

  • Enqueue data into the fixed priority queue.

    +

    Parameters

    • data: T

      Data to enqueue.

      +
    • Optionalpriority: number

      Priority of the data. Lower values have higher priority.

      +

    Returns number

    The new size of the priority queue.

    +

    If the fixed priority queue is full.

    +
  • Gets data from the fixed priority queue.

    +

    Parameters

    • index: number

      The index of the data to get.

      +

    Returns undefined | T

    The data at the index or undefined if the fixed priority queue is empty or the index is out of bounds.

    +
\ No newline at end of file