Class CheckProbVectorKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      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.
      final static Boolean checkProbVector(DoubleArray pi, Boolean sub, Double prec) Overload for DoubleArray input.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.