Package jline.lib.butools.mc
Class CheckProbMatrixKt
-
- All Implemented Interfaces:
public final class CheckProbMatrixKt
-
-
Method Summary
Modifier and Type Method Description final static BooleancheckProbMatrix(Matrix P, Boolean transient, Double prec)Checks if the matrix is a valid probability matrix: the matrix is a square matrix, the matrix has positive or zero elements, the rowsum of the matrix is 1. -
-
Method Detail
-
checkProbMatrix
final static Boolean checkProbMatrix(Matrix P, Boolean transient, Double prec)
Checks if the matrix is a valid probability matrix: the matrix is a square matrix, the matrix has positive or zero elements, the rowsum of the matrix is 1.
If "transient" is true, it checks if the matrix is a valid transient probability matrix: the matrix is a square matrix, the matrix has positive or zero elements, the rowsum of the matrix is less than or equal to 1, the maximum absolute eigenvalue is less than 1.
- Parameters:
P- The matrix to check.transient- If true, the procedure checks if P is a transient probability matrix, otherwise it checks if it is a valid probability matrix.prec- Entries with absolute value less than prec are considered to be zeros.- Returns:
The result of the check.
-
-
-
-