/** * Priority queue for bidirectional BFS frontier management. * * Min-heap implementation that returns items with lowest priority first. * Includes duplicate prevention and iteration support. * * Time Complexity: * - push: O(log n) * - pop: O(log n) * - contains: O(1) * - length: O(1) * * Space Complexity: O(n) for heap array and item set * * @template T - Type of items stored in the queue * @example * ```typescript * const queue = new PriorityQueue(); * queue.push('nodeA', 10); // Low-degree node (high priority) * queue.push('nodeB', 100); // High-degree node (low priority) * * const next = queue.pop(); // Returns 'nodeA' (lower degree = higher priority) * ``` */ export declare class PriorityQueue { private heap; private itemSet; /** * Add an item to the queue with given priority. * Silently ignores duplicates. * * @param item - Item to add * @param priority - Priority value (lower values = higher priority) */ push(item: T, priority: number): void; /** * Remove and return the item with lowest priority. * * @returns Item with minimum priority, or undefined if queue is empty */ pop(): T | undefined; /** * Get the number of items in the queue. */ get length(): number; /** * Peek at the priority of the minimum item without removing it. * * @returns Priority of the item with minimum priority, or Infinity if queue is empty */ peekPriority(): number; /** * Check if an item is in the queue. * * @param item - Item to check * @returns true if item is in queue */ contains(item: T): boolean; /** * Make the queue iterable for checking connections. * Iterates over items in no particular order (not sorted by priority). */ [Symbol.iterator](): Iterator; /** * Bubble up an element to maintain min-heap property. * @param index * @internal */ private bubbleUp; /** * Bubble down an element to maintain min-heap property. * @param index * @internal */ private bubbleDown; } //# sourceMappingURL=priority-queue.d.ts.map