Description Usage Arguments Value Examples
is_valid function; checks whether a matrix is a valid board matrix
1 | is_valid(mat)
|
mat |
a matrix, if valid, a square matrix that contains only 0s, 1s, and 2s |
error if input is not a matrix, or if the input matrix is not square, or if the the input sqaure matrix does not contain only 0s and 1s; returns TRUE otherwise.
1 | is_valid(generate_board_mat()), is_valid(generate_board_mat(n=1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.