1 | import { Collection } from "../Collection";
|
2 | export declare class PriorityQueueNode<T> {
|
3 | private value;
|
4 | private priority;
|
5 | constructor(value: T, priority: number);
|
6 | readonly Value: T;
|
7 | readonly Priority: number;
|
8 | toString(): string;
|
9 | }
|
10 | export declare class PriorityQueue<T> extends Collection<T> {
|
11 | private heap;
|
12 | constructor();
|
13 | peek(): PriorityQueueNode<T>;
|
14 | enqueue(value: T, priority: number): this;
|
15 | dequeue(): PriorityQueueNode<T>;
|
16 | changePriority(value: T, priority: number): void;
|
17 | has(value: T): boolean;
|
18 | clear(): void;
|
19 | isEmpty(): boolean;
|
20 | toString(): string;
|
21 | protected __iterate(fn: (item: T, index: number) => void): void;
|
22 | }
|
23 | export default PriorityQueue;
|