Is object a transition probability matrix?
Examples
if (FALSE) {
probs <- matrix(c(1,0,0,1), nrow = 2)
is_prob_matrix(probs)
probs <- matrix(c(2,0,-1,1), nrow = 2)
assert_that(is_prob_matrix(probs))
}
Is object a transition probability matrix?
if (FALSE) {
probs <- matrix(c(1,0,0,1), nrow = 2)
is_prob_matrix(probs)
probs <- matrix(c(2,0,-1,1), nrow = 2)
assert_that(is_prob_matrix(probs))
}