UNPKG

fp-search-algorithms

Version:

Functional Programming Style Search Algorithms and Unordered Containers

24 lines (23 loc) 514 B
/** * * @category Structures */ export declare class PriorityQueue<T> { private comparator; private equals; private heap; constructor(comparator: (a: T, b: T) => boolean, equals?: (a: T, b: T) => boolean); size(): number; isEmpty(): boolean; peek(): T; has(other: T): boolean; replace(value: T): T; push(value: T): void; pop(): T | undefined; reorder(): void; toArray(): T[]; private greater; private swap; private siftUp; private siftDown; }