import * as IO from 'fp-ts/IO'; import * as M from './Matrix'; import * as MatTypes from './MatrixTypes'; import * as V from './Vector'; import * as C from './Computation'; /** * @since 1.0.0 * @category Model */ export interface Decomposition { input: M.Mat; result: A; } /** * Represents the result of a computation that can solve: * * ```math * Ax = b * ``` * * @since 1.0.4 * @category Model */ export interface Solvable { solve: (b: V.Vec) => V.Vec; } /** * Represents the result of a computation that can be used to calculate the determinant * * @since 1.0.4 * @category Model */ export interface Determinant { det: IO.IO; } /** * Represents a solution to an overdetermined system. Returns O.none if the `rank(A) < m` * (the number of columns). Returns a tuple with the residual, and solution vector * * @since 1.1.0 * @category Model */ export interface LeastSquares { solve: (b: V.Vec) => C.Computation]>; } /** * Determines if `A` is singular * * @since 1.1.0 * @category Model */ export interface IsSingular { isSingular: boolean; } /** * Returns the Rank of A * * @since 1.1.0 * @category Model */ export interface Rank { rank: number; } /** * Decomposition of a square matrix into a lower triangular matrix L and an upper * triangular matrix U, with a permutation matrix P, such that: * * ```math * PA = LU * ``` * * @since 1.0.0 * @category Constructors */ export declare const LUP: (m: M.Mat) => C.Computation, MatTypes.UpperTriangularMatrix, MatTypes.OrthogonalMatrix]> & Solvable & Determinant>; /** * QR decomposition with column pivoting using Householder Reflections. Based on an * algorithm described in Fundamentals of Matrix Computations, David S. Watkins. * * Can be used to calculate a matrix's: * * - Singularity * - Rank * - Least Square Solution for overdetermined systems * * Efficiency: `O(n^3)` * * Returns a tuple with: * * - `A'`: The assembled matrix R with lower triangular components being orthogonal vectors * collectively used to construct the reflector `Q`. * - `Q`: An IO that returns a constructed reflector `Q`. This has the same efficiency as QR * decomposition itself, so evaluation is deferred. * - `R`: The upper triangular matrix extracted from `A'`. * - `P`: The permutation matrix used to permute the columns of `A` * * QR decomposes a matrix A into a matrix `Q`, a matrix `R`, and a matrix `P` such that: * * ```math * AP = QR * ``` * * @since 1.1.0 * @category Constructors */ export declare function QR(mat: M.Mat): C.Computation, IO.IO>, M.Mat, MatTypes.OrthogonalMatrix ]> & IsSingular & Rank & LeastSquares>; //# sourceMappingURL=Decomposition.d.ts.map