/** * A classical min-heap. */ /** API documentation barrier */ /** * Comparator function for the min-heap. */ export declare type Comparator = (left: T, right: T) => number; /** * A binary min-heap. * * @typeparam T the type of elements held in this min heap */ export default class MinHeap { private readonly comparatorFn_; private readonly array_; constructor(iterable: Iterable, comparatorFn: Comparator); /** * Inserts the given element into this min-heap. * * The runtime of this operation is O(log n). * * @param element the element to add */ add(element: T): void; /** * Retrieves and removes the minimum element of this min-heap. * * The runtime of this operation is O(log n). * * @return the minimum element or undefined if the min-heap is empty */ extractMin(): T | undefined; /** * Returns whether this min-heap is empty. */ isEmpty(): boolean; } //# sourceMappingURL=minheap.d.ts.map