import type { ErrorCode } from '@bilig/protocol';
import type { U32 } from '../runtime-state.js';
export type DirectScalarCurrentOperand = {
    kind: 'number';
    value: number;
} | {
    kind: 'error';
    code: ErrorCode;
};
export declare class PendingNumericCellValues {
    private readonly values;
    private readonly assigned;
    get(cellIndex: number): number | undefined;
    has(cellIndex: number): boolean;
    set(cellIndex: number, value: number): void;
}
export declare class DirectFormulaIndexCollection {
    private readonly cellIndices;
    private sharedCellIndices;
    private indexByCell;
    private deltas;
    private deltaAssigned;
    private scalarDeltaAssigned;
    private currentResults;
    private currentResultAssigned;
    private directFormulaCoveredInputCellIndices;
    private directFormulaCoveredInputCellSet;
    private directRangeCoveredInputCellIndices;
    private directRangeCoveredInputCellSet;
    private deltaCount;
    private scalarDeltaCount;
    private constantDelta;
    private validatedScalarDeltaSize;
    private cleanScalarDeltaSize;
    private trustedDirectScalarDeltaSize;
    private cycleIndependentScalarDeltaSize;
    private linearHasProbeCount;
    private sortedCellIndexMin;
    private sortedCellIndexMax;
    get size(): number;
    add(cellIndex: number): void;
    has(cellIndex: number): boolean;
    hasAny(cellIndices: readonly number[] | U32, count?: number): boolean;
    addDelta(cellIndex: number, delta: number): void;
    addScalarDelta(cellIndex: number, delta: number): void;
    private addDeltaWithKind;
    appendDeltas(cellIndices: readonly number[] | U32, deltas: readonly number[], kind?: 'scalar'): void;
    appendSortedDeltas(cellIndices: readonly number[] | U32, deltas: readonly number[], kind?: 'scalar'): void;
    private appendDeltasWithOptions;
    appendConstantDelta(cellIndices: readonly number[] | U32, delta: number, kind?: 'scalar'): void;
    appendSortedConstantDelta(cellIndices: readonly number[] | U32, delta: number, kind?: 'scalar'): void;
    private appendConstantDeltaWithOptions;
    hasDelta(cellIndex: number): boolean;
    getDelta(cellIndex: number): number | undefined;
    getDeltaAt(index: number): number | undefined;
    addCurrentResult(cellIndex: number, result: DirectScalarCurrentOperand): void;
    getCurrentResult(cellIndex: number): DirectScalarCurrentOperand | undefined;
    getCurrentResultAt(index: number): DirectScalarCurrentOperand | undefined;
    hasCompleteDeltas(): boolean;
    getConstantScalarDelta(): number | undefined;
    getConstantDelta(): number | undefined;
    hasCompleteScalarDeltas(): boolean;
    markScalarDeltaCellsValidated(): void;
    markScalarDeltaCellsCleanNumber(): void;
    markScalarDeltaCellsTrustedDirectScalarFormulas(): void;
    markScalarDeltaCellsCycleIndependent(): void;
    hasValidatedScalarDeltaCells(): boolean;
    hasCleanScalarDeltaCells(): boolean;
    hasTrustedDirectScalarDeltaCells(): boolean;
    hasCycleIndependentScalarDeltaCells(): boolean;
    getScalarDeltaAt(index: number): number | undefined;
    getCellIndexAt(index: number): number;
    getCellIndicesForRead(): readonly number[] | U32;
    markDirectRangeInputCovered(cellIndex: number): void;
    hasCoveredDirectRangeInput(cellIndex: number): boolean;
    markDirectFormulaInputCovered(cellIndex: number): void;
    hasCoveredDirectFormulaInput(cellIndex: number): boolean;
    forEach(fn: (cellIndex: number) => void): void;
    forEachIndexed(fn: (cellIndex: number, index: number) => void): void;
    private findIndex;
    private ensureIndex;
    private materializeIndexByCell;
    private appendPreparedDeltas;
    private appendPreparedConstantDelta;
    private tryAppendMatchingConstantDelta;
    private prepareForBulkDeltaAppend;
    private addPreparedDelta;
    private materializeSharedCellIndices;
    private materializeConstantDeltas;
    private updateSortedCellIndexBoundsForAppend;
    private clearSortedCellIndexBounds;
}
