UNPKG

731 BTypeScriptView Raw
1export declare abstract class Heap<T> {
2 private container;
3 readonly Size: number;
4 private getLeftChildIndex;
5 private getRigthChildIndex;
6 private getParentIndex;
7 private getLeftChild;
8 private getRightChild;
9 private getParent;
10 private hasLeftChild;
11 private hasRightChild;
12 private hasParent;
13 private swap;
14 private heapifyUp;
15 private heapifyDown;
16 poll(): T;
17 peek(): T;
18 add(item: T): this;
19 remove(item: ((item: T) => boolean) | T): boolean;
20 toString(): string;
21 isEmpty(): boolean;
22 find(arg: any): T;
23 findAll(arg: any): T[];
24 clear(): void;
25 entries(): T[];
26 private findAllIndex;
27 protected abstract compare(a: any, b: any): boolean;
28}
29
\No newline at end of file