Package jline.lib.butools.mc
Class CheckProbVector
java.lang.Object
jline.lib.butools.mc.CheckProbVector
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckProbVector(double[] pi) static booleancheckProbVector(double[] pi, boolean sub) static booleancheckProbVector(double[] pi, boolean sub, double prec) static booleanstatic booleancheckProbVector(Matrix pi, boolean sub) 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.
-
Method Details
-
checkProbVector
Checks if the vector is a valid probability vector: the vector has only non-negative elements, the sum of the vector elements is 1.- Parameters:
pi- The vector to check.sub- If false, checks for stochastic; if true, checks for sub-stochastic.prec- Numerical precision.- Returns:
- The result of the check.
-
checkProbVector
-
checkProbVector
-
checkProbVector
public static boolean checkProbVector(double[] pi, boolean sub, double prec) -
checkProbVector
public static boolean checkProbVector(double[] pi, boolean sub) -
checkProbVector
public static boolean checkProbVector(double[] pi)
-