R/utils.R
is_tpm.Rd
This function checks if x is a tpm (transition probability matrix).
x
is_tpm(x)
A matrix.
matrix
Either TRUE or FALSE.
TRUE
FALSE
if (FALSE) { is_tpm(diag(2)) is_tpm(matrix(1, 2, 2)) }