X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FPriorityQueueNode.html;h=ba628076ba4b91ce87312a7dd21d3a5fc367ecd3;hb=2efc445b630bfe0b55b843eb3d5c6025115b587c;hp=a59ed58931139ca39d20a764be6618c66bf888c5;hpb=bd904ec278545cbbdc173c97bf29cc0314e33ca0;p=poolifier.git diff --git a/docs/interfaces/PriorityQueueNode.html b/docs/interfaces/PriorityQueueNode.html index a59ed589..ba628076 100644 --- a/docs/interfaces/PriorityQueueNode.html +++ b/docs/interfaces/PriorityQueueNode.html @@ -1,5 +1,35 @@ -PriorityQueueNode | poolifier - v4.0.8

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.13

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, priority?): number;
    full(): boolean;
    get(index): 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.

      +
    • Optional priority: number

      Priority of the data. Lower values have higher priority.

      +

    Returns number

    The new size of the priority queue.

    +

    Throws

    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