import { type LinearCoordinateConstraintBlockDiagnosticN, type LinearCoordinateConstraintBlockN, type LinearCoordinateConstraintFitN, type LinearCoordinateConstraintOptions } from './coordinate-constraints.js'; export interface NamedLinearCoordinateConstraintBlockInputN extends LinearCoordinateConstraintBlockN { /** Stable machine identity, independent of the optional human label. */ readonly key: string; } /** * A block as the system holds it, rather than as it was supplied. * * Two differences from the input, both deliberate: the arrays are owned * copies rather than any `ArrayLike`, so a caller mutating what it passed in * cannot change a system already built; and `weight` and `scale` are resolved * rather than optional, so what the solver will use is on the record instead * of implied by a default. */ export interface NamedLinearCoordinateConstraintBlockN { /** Stable machine identity, matching this block to its diagnostic. */ readonly key: string; /** Owned copy of `A`, packed row-major. */ readonly coefficients: readonly number[]; /** Owned copy of `b`. */ readonly targets: readonly number[]; /** Rows in this block. */ readonly rowCount: number; /** The weight that will be applied, defaults already resolved. */ readonly weight: number; /** The scale that will be applied, defaults already resolved. */ readonly scale: number; /** Human-readable name, for diagnostics only. */ readonly label?: string; } /** Immutable ordered snapshot of named linear coordinate constraints. */ export interface LinearCoordinateConstraintSystemN { /** Discriminant, for narrowing. */ readonly kind: 'linear-coordinate-constraint-system'; /** Width of the coordinate the blocks constrain; every block's rows are * this long. */ readonly coordinateDim: number; /** The blocks, in the order supplied, with keys already checked unique. */ readonly blocks: readonly NamedLinearCoordinateConstraintBlockN[]; } /** * A block diagnostic carrying the key of the block that produced it, so a * result can be attributed without relying on position or on an optional * human label. */ export interface NamedLinearCoordinateConstraintBlockDiagnosticN extends LinearCoordinateConstraintBlockDiagnosticN { /** Identity of the block this describes. */ readonly key: string; } /** * A solve of the whole system, with each block's contribution attributed to * the block that made it. */ export interface LinearCoordinateConstraintSystemFitN extends LinearCoordinateConstraintFitN { /** Keys in the order the blocks were solved, parallel to `blocks`. */ readonly blockKeys: readonly string[]; /** Per-block diagnostics; read `rank` against `rowCount` first. */ readonly blocks: readonly NamedLinearCoordinateConstraintBlockDiagnosticN[]; } /** Create an owned immutable snapshot, rejecting duplicate block keys. */ export declare function createLinearCoordinateConstraintSystemN(coordinateDim: number, blocks?: readonly NamedLinearCoordinateConstraintBlockInputN[]): LinearCoordinateConstraintSystemN; /** * Return a new snapshot with `key` inserted or replaced. * * Replacement retains the existing position. A new key appends, so solving * and diagnostics have deterministic order independent of object-map rules. */ export declare function withLinearCoordinateConstraintBlockN(system: LinearCoordinateConstraintSystemN, key: string, block: LinearCoordinateConstraintBlockN): LinearCoordinateConstraintSystemN; /** Return a new snapshot without `key`; an absent key preserves identity. */ export declare function withoutLinearCoordinateConstraintBlockN(system: LinearCoordinateConstraintSystemN, key: string): LinearCoordinateConstraintSystemN; /** Return the immutable named block, or `undefined` when it is absent. */ export declare function getLinearCoordinateConstraintBlockN(system: LinearCoordinateConstraintSystemN, key: string): NamedLinearCoordinateConstraintBlockN | undefined; /** Return an empty snapshot; an already empty system preserves identity. */ export declare function clearLinearCoordinateConstraintSystemN(system: LinearCoordinateConstraintSystemN): LinearCoordinateConstraintSystemN; /** Solve a named snapshot through the deterministic Stage C5 golden path. */ export declare function solveLinearCoordinateConstraintSystemN(system: LinearCoordinateConstraintSystemN, options?: LinearCoordinateConstraintOptions): LinearCoordinateConstraintSystemFitN; //# sourceMappingURL=coordinate-constraint-system.d.ts.map