/// import type { HeapEntry } from "./priority-types"; /** * In a max priority queue, elements are inserted in the order in which they arrive to * the queue and the maximum value is always removed first from the queue. */ export declare class MinPriorityQueue { readonly array: HeapEntry[]; length: number; static readonly instanceof: (value: unknown) => value is MinPriorityQueue; /** * Add an element to the `MinPriorityQueue` with an associated priority. * * @param value * @param priority * @returns */ insertWithPriority(value: T, priority: number): number; insert(value: T, priority: number): number; /** * Changes the priority of the given value in the `MinPriorityQueue`. */ changePriority(value: T, newPriority: number): number; /** * Gets the priority of the first value in the `MinPriorityQueue`. This is the * value that will be removed last. * @returns */ getFirstPriority(): number | undefined; /** * Gets the priority of the last value in the `MinPriorityQueue`. This is the * value that will be removed first. * @returns */ getLastPriority(): number | undefined; popElement(onlyValue?: boolean): T | HeapEntry | undefined; /** * Clears the entire `MinPriorityQueue`. */ clear(): this; contains(value: T): boolean; removePriority(priority: number): void; removeValue(value: T): void; size(): number; isEmpty(): boolean; }