import * as Point from './point'; /** A two-dimensional array of given type T in rows and columns */ export type Matrix = Array>; /** * Creates an empty matrix with given rows and columns * @param rows - integer, the amount of rows the matrix should have * @param columns - integer, the amount of columns the matrix should have * @returns an empty matrix with given rows and columns */ export declare function createEmpty(rows: number, columns: number): Matrix; /** Gets the value at row and column of matrix. */ export declare function get(point: Point.Point, matrix: Matrix): T | undefined; /** Creates a slice of matrix from startPoint up to, but not including, endPoint. */ export declare function slice(startPoint: Point.Point, endPoint: Point.Point, matrix: Matrix): Matrix; /** Sets the value at row and column of matrix. If a row doesn't exist, it's created. */ export declare function set(point: Point.Point, value: T, matrix: Matrix): Matrix; /** Like Matrix.set() but mutates the matrix */ export declare function mutableSet(point: Point.Point, value: T, matrix: Matrix): void; /** Removes the coordinate of matrix */ export declare const convertPtToPx: (pt: number) => string; export declare function unset(point: Point.Point, matrix: Matrix): Matrix; /** Creates an array of values by running each element in collection thru iteratee. */ export declare function map(func: (value: T | undefined, point: Point.Point) => T2, matrix: Matrix): Matrix; /** Create an iterator over the cells in the matrix */ export declare function entries(matrix: Matrix): IterableIterator<[Point.Point, T | undefined]>; /** * Converts all elements in row into a string separated by horizontalSeparator and each row string * to string separated by verticalSeparator */ export declare function join(matrix: Matrix, horizontalSeparator?: string, verticalSeparator?: string): string; /** * Parses a CSV separated by a horizontalSeparator and verticalSeparator into a * Matrix using a transform function */ export declare function split(csv: string, transform: (value: string) => T, horizontalSeparator?: string, verticalSeparator?: string | RegExp): Matrix; /** Returns whether the point exists in the matrix or not. */ export declare function has(point: Point.Point, matrix: Matrix): boolean; /** Counts of the rows and column in a matrix */ export type Size = { /** Count of the rows in the matrix */ rows: number; /** Count of the columns in the matrix */ columns: number; }; /** Gets the count of rows and columns of given matrix */ export declare function getSize(matrix: Matrix): Size; /** Gets the count of rows of given matrix */ export declare function getRowsCount(matrix: Matrix): number; /** Gets the count of columns of given matrix */ export declare function getColumnsCount(matrix: Matrix): number; /** * Pads matrix with empty rows to match given total rows * @param matrix - matrix to pad * @param totalRows - number of rows the matrix should have * @returns the updated matrix */ export declare function padRows(matrix: Matrix, totalRows: number): Matrix; /** * Pads matrix with empty columns to match given total columns * @param matrix - matrix to pad * @param size - minimum size of the matrix after padding. * @returns the updated matrix */ export declare function pad(matrix: Matrix, size: Size): Matrix; export declare function toArray(matrix: Matrix): T[]; export declare function toArray(matrix: Matrix, transform: (cell: T1 | undefined, coords: Point.Point) => T2): T2[]; /** Returns the maximum point in the matrix */ export declare function maxPoint(matrix: Matrix): Point.Point;