import { Optional } from '../../typings/standard-types'; export declare namespace Matrices { type RowColumn = { row: number; column: number; }; type Coordinate = { row: number; column: number; isCoordinate: (value: T) => boolean; inbounds: (matrix: T[][]) => boolean; isBefore: (coordinate: Coordinate) => boolean; clone: () => Coordinate; setToAverage: (min: Coordinate, max: Coordinate) => void; }; /** @public * @module matrix * @param {Array} data Input matrix. * @param {Number} col1 Index of a column to swap by. * @param {Number} col2 Index of a column to swap with. */ const swapCols: (data: T[][], col1: number, col2: number) => void; const det1: (matrix: T[]) => T; const det2: (matrix: any) => number; const det3: (matrix: any) => number; const detn: (matrix: T[][]) => number; const calculateDeterminant: (matrix: any) => number; const getSubMatrix: (row: number, col: number, matrix: T[][]) => T[][]; /** @public * @module matrix * @param {Array} data Input matrix. * @param {Number} row1 Index of a row to swap by. * @param {Number} row2 Index of a row to swap with. */ const swapRows: (data: T[][], row1: number, row2: number) => void; /** @public * @module matrix * @param {Array} data Input matrix. * @param {Number} col Index of a column to swap with. */ const sortByCol: (data: T[][], col: number) => T[][]; /** @public * @module matrix * @param {Array} data Input array. * @return {Array} min-max array. * * @example * let distance = [[1, 1, 2, 6, 0, 1], * [4, 0, 3, 8, 3, 1], * [8, 0, 1, 5, 0, 9], * [3, 1, 4, 8, 8, 3], * [2, 2, 9, 5, 2, 4], * [3, 2, 3, 6, 7, 3]]; * document.writeln(globals.matrix.getMinMax(distance)[0].row); */ const getMinMax: (data: number[][]) => RowColumn[]; /** @public * @module matrix * @param {Array} data Input matrix. * @return {Array} Current sorted matrix. */ const sort: (data: T[][]) => T[][]; /** @public * @module matrix * @param {Array} data Input matrix. * @return {Array} Transposed matrix. */ const transpose: (data: T[][]) => T[][]; /** @public * @module matrix * @param {Array} data1 Input matrix. * @param {Array} data2 Input matrix to multiplicate with. * @return {Array} Multiplicated matrix. */ const multMatrix: (data1: number[][], data2: number[][]) => number[][]; /** @public * @module matrix * @param {Array} data Input matrix. * @param {Number} num Input number to multiplicate with. * @return {Array} Multiplicated matrix. */ const multNumber: (data: number[][], num: number) => number[][]; /** @public * @module matrix * @param {Array} data1 Input matrix. * @param {Array} data2 Input matrix to multiplicate with. * @return {Array} Multiplicated matrix. */ const sumMatrix: (data1: number[][], data2: number[][]) => number[][]; /** @public * @module matrix * @param {Array} data Input matrix. * @param {Number} num Input number to multiplicate with. * @return {Array} Multiplicated matrix. */ const matrixPow: (data: number[][], num: number) => number[][]; /** * @public * @module matrix * @param {Array} data Input array. * @param {Boolean} isNullDiagonal Boolean flag. * @return {Array} Matrix * * @example * let distance = [[0, 7, 3, 7, 1], * [1, 0, 8, 6, 3], * [1, 1, 0, 0, 1], * [0, 5, 0, 0, 0], * [1, 23, 1, 1, 0]]; * document.writeln(globals.matrix.addOnColumns(distance)); */ /** * @public * @module matrix * @param {Array} data Input array. * @param {Boolean} isNullDiagonal Boolean flag. * @return {Array} Matrix * * @example * let distance = [[0, 7, 3, 7, 1], * [1, 0, 8, 6, 3], * [1, 1, 0, 0, 1], * [0, 5, 0, 0, 0], * [1, 23, 1, 1, 0]]; * document.writeln(globals.matrix.addOnRows(distance)); */ /** * @public * @module matrix * @param {Integer} num Matrix rang. * @return {Array} Matrix. * * @example * let myMatrixIdentity = globals.toolset.identity(4); */ const identity: (num: number) => number[][]; /** * @public * @module matrix * @param {Array} matrix Matrix array. * @return {Object} {row: row, col: col, squareSize: squareSize}. * * @example * let matrix = [[0, 1, 2], [0, 1, 2], [0, 1, 2]]; * let mySquare = globals.toolset.findSquare(matrix); */ const findSquare: (matrix: number[][]) => Optional<{ row: number; col: number; squareSize: number; }>; /** * @public * @module matrix * @param {Array} matrix Matrix array. * @return {Object} {row: row, col: col, squareSize: squareSize}. * * @example * let matrix = [[0, 1, 2], [0, 1, 2], [0, 1, 2]]; * let mySquare = globals.toolset.findSquare(matrix); */ const findSquare2: (matrix: number[][]) => Optional<{ row: number; col: number; squareSize: number; }>; /** * @public * @module matrix * @param {Array} matrix Matrix array. * @return {Integer} maximum sum of submatrix elements. * * @example * let matrix = [[0, 1, 2], [0, 1, 2], [0, 1, 2]]; * let maxSubmatrixSum = globals.toolset.getMaxSubMatrix(matrix); */ const getMaxSubMatrix: (matrix: number[][]) => number; /** * @public * @module matrix * @param {Array} matrix Matrix array. * @return {Integer} maximum sum of submatrix elements. * * @example * let matrix = [[0, 1, 2], [0, 1, 2], [0, 1, 2]]; * let maxSubmatrixSum = globals.toolset.getMaxSubMatrix(matrix); */ const getMaxSubMatrix2: (matrix: number[][]) => number; const checkPattern: (matrix: number[][]) => number; const findElement: (matrix: number[][], elem: number) => boolean; const findElement2: (data: Optional[][], elem: T) => Optional; const setZeros: (data: number[][]) => void; const rotate: (matrix: Optional[][], n: number) => void; const vectorToMatrix: (vec: Optional[], rang: number) => Optional[][]; const matrixToVector: (mat: Optional[][]) => Optional[]; const matrixToVector2: (mat: Optional[][]) => Optional[]; const norm: (matrix: number[][]) => number; const spiral: (matrix: T[][]) => Optional[]; const sortByMaxColumn: (data: number[][]) => void; const determinant: (data: number[][]) => number; const adjugateMatrix: (data: number[][]) => number[][]; const inverseMatrix: (matrix: number[][]) => number[][]; const matrixRank: (data: number[][]) => number; const maxInRows: (data: number[][]) => number[]; const maxInCols: (data: number[][]) => number[]; type MagicSquare = 1 | 2 | 3 | 4; /** * Функция отдаёт число, обозначающее: * 1 - не магический квадрат * 2 - полумагический (только строки и столбцы) * 3 - диагональный магический квадрат (только диагонали!) * 4 - магический квадрат (строки, столбцы, диагонали) */ const isMagicSquare: (matrix: number[][]) => number; const createMagicSquare: (n: number) => number[][]; const createMagicSquareTerraces: (n: number) => Optional[][]; /** * Multiply matrix A by matrix B to nest transformations * @static * @memberOf fabric.util * @param {Array} a First transformMatrix * @param {Array} b Second transformMatrix * @param {Boolean} is2x2 flag to multiply matrices as 2x2 matrices * @return {Array} The product of the two transform matrices */ const multiplyTransformMatrices: (a: number[], b: number[], is2x2: boolean) => number[]; const choleskyDecomposition: (data: number[][]) => number[][]; const rank: (data: number[][]) => number; } //# sourceMappingURL=matrices.d.ts.map