is_valid: is_valid function; checks whether a matrix is a valid board...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

is_valid function; checks whether a matrix is a valid board matrix

Usage

1
is_valid(mat)

Arguments

mat

a matrix, if valid, a square matrix that contains only 0s, 1s, and 2s

Value

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.

Examples

1

adityagandhi81298/percolate documentation built on Nov. 1, 2019, 8:54 p.m.