Skip to contents

This function checks if x is a tpm (transition probability matrix).

Usage

is_tpm(x)

Arguments

x

A matrix.

Value

A boolean.

Examples

fHMM:::is_tpm(diag(2))
#> [1] TRUE
fHMM:::is_tpm(matrix(1, 2, 2))
#> [1] FALSE