Converts a set or algebraic structure to a matrix.
The set or structure
The number of rows of the matrix
Optional
The number of columns of the matrix (optional, defaults to the number of rows to make a square matrix)
const set = Chalkboard.abal.set([1, 2, 3, 4]);const matrix = Chalkboard.abal.toMatrix(set, 2); // Returns [[1, 2], [3, 4]] Copy
const set = Chalkboard.abal.set([1, 2, 3, 4]);const matrix = Chalkboard.abal.toMatrix(set, 2); // Returns [[1, 2], [3, 4]]
Converts a set or algebraic structure to a matrix.