1 | import { ICompare } from "../interface/ICompare";
|
2 | import { LinkNode } from "../linklist/LinkNode";
|
3 | export interface HeapNode<T> {
|
4 | value: T;
|
5 | degree: number;
|
6 | child?: LinkNode<HeapNode<T>>;
|
7 | parent?: LinkNode<HeapNode<T>>;
|
8 | }
|
9 | export declare class BinomialHeap<T = number> {
|
10 | private compare;
|
11 | private head;
|
12 | private count;
|
13 | constructor(compare?: ICompare<T>);
|
14 | readonly Count: number;
|
15 | readonly Head: LinkNode<HeapNode<T>>;
|
16 | private setHead;
|
17 | clear(): void;
|
18 | isEmpty(): boolean;
|
19 | insert(value: T): LinkNode<HeapNode<T>>;
|
20 | deleteExtremum(): T;
|
21 | private _findExtremum;
|
22 | findExtremum(): T;
|
23 | union(heap: BinomialHeap<T>): this;
|
24 | private link;
|
25 | private mergeHeaps;
|
26 | }
|