/** * Numerical helpers shared by the mixture-model estimators. * * Everything here is dependency-free plain math so the fitted state of the * estimators stays serializable (no function-valued fields are ever stored). */ /** Machine epsilon for float64 (same constant sklearn uses as `np.finfo(float64).eps`). */ export declare const EPS = 2.220446049250313e-16; /** Numerically stable log(sum(exp(values))). */ export declare function logsumexp(values: number[]): number; /** * Cholesky decomposition of a symmetric positive-definite matrix. * Returns the lower-triangular factor L with A = L·Lᵀ. */ export declare function cholesky(a: number[][]): number[][]; /** Solve L·x = b for lower-triangular L (forward substitution). */ export declare function solveLowerTriangular(L: number[][], b: number[]): number[]; /** Inverse of a symmetric positive-definite matrix via its Cholesky factor. */ export declare function spdInverse(a: number[][]): number[][]; /** log Γ(x) via the Lanczos approximation (reflection formula for x < 0.5). */ export declare function logGamma(x: number): number; /** * Digamma function ψ(x) for x > 0: the recurrence ψ(x) = ψ(x+1) − 1/x lifts the * argument above 10, then the asymptotic series * ψ(x) ≈ ln x − 1/(2x) − 1/(12x²) + 1/(120x⁴) − 1/(252x⁶) + 1/(240x⁸) − 1/(132x¹⁰) * is accurate to well below 1e-13. */ export declare function digamma(x: number): number; /** log Β(a, b) = log Γ(a) + log Γ(b) − log Γ(a + b). */ export declare function betaln(a: number, b: number): number;