/**
 * A bounded cache that automatically evicts the oldest entries when the cache exceeds max size.
 * Uses FIFO eviction strategy.
 */
export declare class BoundedCache<K, V extends object> {
    private cache;
    private readonly maxLen;
    constructor(maxLen?: number);
    set(key: K, value: V): void;
    /**
     * Update existing value fields if present and defined.
     */
    updateValue(key: K, fields: Partial<V>): V | undefined;
    /**
     * Set a new value with factory when missing; otherwise update in place.
     * Mirrors python BoundedDict.set_or_update behavior.
     */
    setOrUpdate(key: K, factory: () => V, fields: Partial<V>): V;
    get(key: K): V | undefined;
    has(key: K): boolean;
    delete(key: K): boolean;
    /**
     * Pop an entry if it satisfies the predicate.
     * - No predicate: pop oldest (FIFO)
     * - With predicate: search in reverse order and pop first match
     */
    pop(predicate?: (value: V) => boolean): V | undefined;
    clear(): void;
    get size(): number;
    values(): IterableIterator<V>;
    keys(): IterableIterator<K>;
    entries(): IterableIterator<[K, V]>;
}
/**
 * Estimate probability by finding the n-th maximum value in the probabilities array.
 * The n-th position is determined by the window size (25ms per frame).
 * Returns 0 if there are insufficient probabilities.
 */
export declare function estimateProbability(probabilities: number[], windowSizeInS?: number): number;
//# sourceMappingURL=utils.d.ts.map