/** * Compares two values of type T. * * @public */ export type Comparator = (a: T, b: T) => number; /** * Minimum heap. * * @public */ export declare class Heap { private readonly cmp; private items; constructor(cmp: Comparator, data: T[]); /** * Is the heap empty? * * @public */ empty(): boolean; /** * Push an item and sift up. * * @public */ push(item: T): void; /** * Pop the minimum item. * * @public */ pop(): T | undefined; /** * Sift down. */ private _down; /** * Sift up. */ private _up; private swap; }