• Initializes a new matrix.

    Parameters

    • Rest ...matrix: number[][] | number[][][]

      Either a sequence of 1D arrays to be used as rows for the matrix or one 2D array to be used as the matrix

    Returns ChalkboardMatrix

    Example

    // Defines a 3x3 matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
    let A = Chalkboard.matr.init([1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]);
    let B = Chalkboard.matr.init([[1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]]);

Generated using TypeDoc