/** * Generic priority queue using a binary heap. * * @description * Implements a min-heap based priority queue for efficient O(log n) * insertion and extraction of highest priority items. * * @template T - Type of items in the queue */ export declare class PriorityQueue { private heap; /** * Returns the number of items in the queue. */ get size(): number; /** * Returns whether the queue is empty. */ get isEmpty(): boolean; /** * Inserts an item into the queue. * @param item - Item to insert */ enqueue(item: T): void; /** * Removes and returns the highest priority item. * @returns The highest priority item or undefined if queue is empty */ dequeue(): T | undefined; /** * Returns the highest priority item without removing it. * @returns The highest priority item or undefined if queue is empty */ peek(): T | undefined; /** * Removes all items from the queue. */ clear(): void; /** * Removes a specific item from the queue. * @param predicate - Function to identify the item to remove * @returns Whether an item was removed */ remove(predicate: (item: T) => boolean): boolean; /** * Returns all items in the queue (not in priority order). */ toArray(): T[]; private bubbleUp; private bubbleDown; }