/**
 * Fibonacci heap implementation that stores uint32 ID along with a floating point score value, intended to be
 * API-compatible with {@link Uint32Heap}.
 *
 * Storage is struct-of-arrays on top of a single {@link BinaryElementPool} — each "node" is a 32-byte
 * record in a contiguous ArrayBuffer, and "node references" are uint32 handles rather than object pointers.
 * This keeps all per-node state in continuous memory, avoiding the per-element allocation and pointer chasing
 * of an object-graph implementation.
 *
 * Fibonacci heaps have theoretically excellent asymptotic bounds:
 *   - insert, find-min, decrease-key: amortized O(1)
 *   - extract-min, delete: amortized O(log n)
 *
 * In practice they often lose to a simple binary or 4-ary heap on graph-search workloads because of poor
 * cache behavior; this layout closes most of that gap by removing the indirection. See Larkin, Sen &amp; Tarjan
 * (2014), "A Back-to-Basics Empirical Study of Priority Queues" (arXiv:1403.0252) for the empirical context.
 *
 * Reference: Cormen, Leiserson, Rivest, Stein, "Introduction to Algorithms", 3rd ed., chapter 19.
 *
 * @see Uint32Heap
 * @see Uint32Heap4
 */
export class FibonacciHeap {
    /**
     *
     * @param {number} [initial_capacity] reserves space for this many nodes up front. The pool grows on demand.
     */
    constructor(initial_capacity?: number);
    /**
     * @type {BinaryElementPool}
     * @private
     */
    private __pool;
    /**
     * Handle of the node with the smallest key, or NULL_HANDLE if empty.
     * @type {number}
     * @private
     */
    private __min;
    /**
     * Number of nodes currently in the heap.
     * @type {number}
     * @private
     */
    private __size;
    /**
     * Id -> handle lookup, allows update_score / remove / contains / get_score in O(1) expected.
     *
     * Empirically (see the bench tests in FibonacciHeap.spec.js), V8's built-in Map beats a hand-rolled
     * Uint32Array-backed Robin Hood hash table for this workload by 20-90 % on hot paths. Reason: every
     * key and value here is SMI (ids and handles are both small), so V8 Map's native C++ SMI fast path
     * never boxes; meanwhile a JS-side flat-array implementation pays per-probe Math.imul + bounds-checks
     * that V8's compiled Map sidesteps. The Uint32Map primitive lives at core/collection/Uint32Map.js
     * and is the right choice when keys/values exceed 2^30 (V8 Map boxes) or when delete churn is
     * extreme (V8 Map tombstone-rots until rehash) — but not here.
     *
     * @type {Map<number, number>}
     * @private
     */
    private __handles;
    /**
     *
     * @returns {number}
     */
    get size(): number;
    /**
     * Node with the lowest score
     * @returns {number}
     */
    get top_id(): number;
    /**
     *
     * @returns {boolean}
     */
    is_empty(): boolean;
    /**
     * Returns the score of the node with the lowest score
     * @returns {number}
     */
    peek_score(): number;
    /**
     * Returns the ID of the node with the lowest score
     * @returns {number}
     */
    peek_min(): number;
    /**
     * Splice `handle` (a single-element circular list) into the root list to the right of `__min`. The caller
     * is responsible for setting parent and degree on `handle`.
     *
     * @private
     * @param {number} handle
     */
    private __root_insert;
    /**
     * Remove `handle` from its sibling list (root list or child list of some parent). Sibling pointers of
     * `handle` are left dangling; the caller is expected to re-link it immediately.
     *
     * @private
     * @param {number} handle
     */
    private __unlink_from_siblings;
    /**
     *
     * @param {number} id
     * @param {number} score
     */
    insert(id: number, score: number): void;
    /**
     * Removed and returns the ID of the node with the lowest score.
     *
     * @returns {number}
     */
    pop_min(): number;
    /**
     * Merge trees of equal degree until every degree is unique among the roots. Sets `__min` to the true
     * minimum.
     *
     * @private
     */
    private __consolidate;
    /**
     * Make `y` (currently in the root list) a child of `x`.
     *
     * @private
     * @param {number} y
     * @param {number} x
     */
    private __link;
    /**
     * Decrease the key of `handle` to `new_key`. `new_key` must be <= current key.
     *
     * @private
     * @param {number} handle
     * @param {number} new_key
     */
    private __decrease_key;
    /**
     * Cut `x` from `y`'s child list and promote it to the root list.
     *
     * @private
     * @param {number} x child being cut
     * @param {number} y parent of x
     */
    private __cut;
    /**
     * Walk up from `y`, cutting marked ancestors and marking unmarked ones.
     *
     * @private
     * @param {number} y
     */
    private __cascading_cut;
    /**
     * Delete the node referenced by `handle` by decreasing its key to -Infinity and popping the min.
     *
     * @private
     * @param {number} handle
     */
    private __delete_handle;
    /**
     *
     * @param {number} id
     * @returns {boolean}
     */
    contains(id: number): boolean;
    /**
     *
     * @param {number} id
     * @returns {number} score of the element with the given id, NaN if not found
     */
    get_score(id: number): number;
    /**
     *
     * @param {number} id
     * @param {number} score
     */
    update_score(id: number, score: number): void;
    /**
     * Insert or update an element, if the element already exists, its score will be updated.
     *
     * @param {number} id
     * @param {number} score
     */
    insert_or_update(id: number, score: number): void;
    /**
     *
     * @param {number} id
     * @returns {boolean}
     */
    remove(id: number): boolean;
    /**
     * Clear out all the data, heap will be made empty
     */
    clear(): void;
}
//# sourceMappingURL=FibonacciHeap.d.ts.map