UNPKG

@allmaps/stdlib

Version:

Allmaps Standard Library

14 lines (13 loc) 1.05 kB
import type { Size } from '@allmaps/types'; /** * Create and fill a ArrayMatrix: an Arrays of Arrays, that can later be loaded as a ml-matrix Matrix */ export declare function newArrayMatrix<T = number>(rows: number, cols: number, value?: T): T[][]; export declare function arrayMatrixSize<T>(arrayMatrix: T[][]): Size; export declare function shallowCopyArrayMatrix<T>(arrayMatrix: T[][]): T[][]; export declare function sliceArrayMatrix<T>(arrayMatrix: T[][], rowsStart: number, colsStart: number, rowsEnd?: number, colsEnd?: number): T[][]; export declare function subArrayMatrix<T>(arrayMatrix: T[][], rows: number[], cols: number[]): T[][]; export declare function multiplyArrayMatrix(arrayMatrix: number[][], factor: number): number[][]; export declare function pasteArrayMatrix<T>(arrayMatrix: T[][], rowsStart: number, colsStart: number, subArrayMatrix: T[][]): T[][]; export declare function transposeArrayMatrix<T>(arrayMatrix: T[][]): T[][]; export declare function newBlockArrayMatrix<T = number>(blocks: T[][][][], emptyValue?: T): T[][];