/** * Array of numbers. */ export type Vector = number[]; /** * Array of vectors. */ export type Matrix = Vector[]; /** * Solves system of equations using Gauss-Jordan elimination. * * Brings the matrix to reduced row echelon form, while simultaneously reducing and thus solving the augmented results * matrix. * * See also http://en.wikipedia.org/wiki/Gauss-Jordan_elimination * * * Note that the 'matrix' is given as a 'array of arrays' of rank size. That is values can be assigned * as matrix[row][column] where 'row' is typically the equation, and 'column' is the term of the equation. * That is the matrix is in the form of a 'row first array'. * * However, 'vectors' is a 'array of arrays' which can have any number of columns, with each column array the same * 'rank' size as 'matrix'. * * This allows for simpler handling of the results, especially is only one column 'vector' is all that is required * to produce the desired solution. * * For example, the 'vectors' can consist of simple array of numbers. when only one set of simultaneous equations is * to be solved from the given set of coefficient weighted terms. * * However, by specifying more 'columns' (as an 'array of vector columns', you can use this function to solve a set of * 'separable' equations. * * For example a distortion function where * ``` * u = U(x,y) v = V(x,y) * ``` * And the functions U() and V() have separate coefficients, but are being generated from a common x,y->u,v data set. * * You can also use the 'vectors' to generate an inverse of the given 'matrix' though as a 'column first array' rather * than a 'row first array'. For details see http://en.wikipedia.org/wiki/Gauss-Jordan_elimination * * * @see https://imagemagick.org/api/MagickCore/matrix_8c_source.html#l00480 GaussJordanElimination() at * ImageMagick source. * * @param coefficients Linear equations system coefficients. * @param results Augment results matrix. */ export declare function gaussJordanElimination(coefficients: Matrix, results: Matrix): Matrix;