goban
Version:
[](https://opensource.org/licenses/Apache-2.0) [](https://deepwiki.com/online-go/goban)
14 lines (13 loc) • 724 B
TypeScript
export type Matrix<T> = T[][];
export type NumberMatrix = Matrix<number>;
export type StringMatrix = Matrix<string>;
/** Returns a cloned copy of the provided matrix */
export declare function cloneMatrix<T>(matrix: T[][]): T[][];
/**
* Returns true if the contents of the two 2d matrices are equal when the
* cells are compared with ===
*/
export declare function matricesAreEqual<T>(m1: T[][], m2: T[][]): boolean;
export declare function makeMatrix<T = number>(width: number, height: number, initialValue: T): Matrix<T>;
export declare function makeObjectMatrix<T>(width: number, height: number): Array<Array<T>>;
export declare function makeEmptyMatrix<T>(width: number, height: number): Array<Array<T | undefined>>;