UNPKG

goban

Version:

[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/online-go/goban)

14 lines (13 loc) 724 B
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>>;