Package jline.lib.butools.mc
Class CheckProbVectorKt
-
- All Implemented Interfaces:
public final class CheckProbVectorKt
-
-
Method Summary
Modifier and Type Method Description final static BooleancheckProbVector(Matrix pi, Boolean sub, Double prec)Checks if the vector is a valid probability vector: the vector has only non-negative elements, the sum of the vector elements is 1. final static BooleancheckProbVector(DoubleArray pi, Boolean sub, Double prec)Overload for DoubleArray input. -
-
Method Detail
-
checkProbVector
final static Boolean checkProbVector(Matrix pi, Boolean sub, Double prec)
Checks if the vector is a valid probability vector: the vector has only non-negative elements, the sum of the vector elements is 1.
If parameter "sub" is set to true, it checks if the vector is a valid substochastic vector: the vector has only non-negative elements, the sum of the elements are less than or equal to 1.
- Parameters:
pi- The vector to check.sub- If false, the procedure checks for stochastic, if true, it checks for sub-stochastic property.prec- Numerical precision.- Returns:
The result of the check.
-
checkProbVector
final static Boolean checkProbVector(DoubleArray pi, Boolean sub, Double prec)
Overload for DoubleArray input.
-
-
-
-