X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FPriorityQueueNode.html;h=383789f39e2da4fbc4192a943b9a80e8b40788c1;hb=224d008191f52fa20b93e1ba67919569f8d6e315;hp=1fd3b7d3ad757910797663b7d48dcf65a14bca8a;hpb=dea42379cfdbcf1c1c9800df7c097eab484ebc07;p=poolifier.git diff --git a/docs/interfaces/PriorityQueueNode.html b/docs/interfaces/PriorityQueueNode.html index 1fd3b7d3..383789f3 100644 --- a/docs/interfaces/PriorityQueueNode.html +++ b/docs/interfaces/PriorityQueueNode.html @@ -1,6 +1,6 @@ -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, priority?): number;
    full(): boolean;
    get(index): undefined | T;
}

Type Parameters

  • T

    Type of priority queue node data.

    -

Hierarchy (view full)

Properties

capacity +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

Properties

capacity: number

The fixed priority queue capacity.

-
enablePriority: boolean

Whether to enable priority.

-
size: number

The fixed priority queue size.

-

Methods

  • Returns an iterator for the fixed priority queue.

    +

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.

      +
    • Optionalpriority: 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 +
\ No newline at end of file