import { type Matrix, type Vector } from "./gaussJordanElimination"; /** * Solves system of equations using Least Squares method. * @see https://imagemagick.org/api/MagickCore/matrix_8c_source.html#l00829 LeastSquaresAddTerms() at * ImageMagick source. */ export declare class LeastSquares { /** * Coefficients of equations to solve. * * @private */ private readonly coefficients; /** * Results of equations to solve. * * @private */ private readonly results; /** * LeastSquares constructor. * * @param rank The rank or size of the dimensions of the square matrix. * Also, the length of vectors, and number of terms being added. * @param numVectors Number of result vectors, and number of results being * added. Also represents the number of separable systems of equations * that is being solved. */ constructor(rank: number, numVectors?: number); /** * Adds one set of terms and associate results to the given matrix and vectors for solving using least-squares * function fitting. * * @param terms The pre-calculated terms (without any coefficient weights) that forms the equation being added. * @param results The result(s) that should be generated from the given terms weighted by the yet-to-be-solved * coefficients. * * @see https://imagemagick.org/api/MagickCore/matrix_8c_source.html#l00829 LeastSquaresAddTerms() at * ImageMagick source. */ addTerms(terms: Vector, results: Vector): this; /** * Returns equations solving results matrix */ solve(): Matrix; }