import { PeekableQueue, SyncQueue } from '../queue.js'; /** A binary heap. */ export declare class BinaryHeap implements PeekableQueue, SyncQueue { /** The compare function to order elements. */ private readonly compare; private heap; constructor( /** Initial elements for this heap. */ items?: Iterable, /** The compare function to order elements. */ compare?: (lhs: T, rhs: T) => number, /** Whether to heapify the initial elements. Set this to false if elements are already in heap order. */ heapify?: boolean); /** Returns the size of this {@link BinaryHeap}. */ get size(): number; /** Returns the top element, or undefined if empty. */ front(): T | undefined; /** Clears this {@link BinaryHeap}. */ clear(): void; /** Adds an element to this heap. */ push(value: T): void; /** Removes and returns the top element, or undefined if empty. */ shift(): T | undefined; private parent; private heapifyUp; private heapifyDown; } //# sourceMappingURL=heap.d.ts.map