Documentation of 'org.ejml.ops.EjmlUnitTests' Java class
EjmlUnitTests
org.ejml.ops

Class EjmlUnitTests



  • public class EjmlUnitTests
    extends java.lang.Object
    Contains various functions related to unit testing matrix operations.
    • Constructor Detail

      • EjmlUnitTests

        public EjmlUnitTests()
    • Method Detail

      • assertCountable

        public static void assertCountable(RealMatrix64F A)
        Checks to see if every element in A is countable. A doesn't have any element with a value of NaN or infinite.
        Parameters:
        A - Matrix
      • assertShape

        public static void assertShape(Matrix A,
                                       Matrix B)

        Checks to see if A and B have the same shape.

        Parameters:
        A - Matrix
        B - Matrix
      • assertShape

        public static void assertShape(RealMatrix64F A,
                                       int numRows,
                                       int numCols)

        Checks to see if the matrix has the specified number of rows and columns.

        Parameters:
        A - Matrix
        numRows - expected number of rows in the matrix
        numCols - expected number of columns in the matrix
      • assertEqualsUncountable

        public static void assertEqualsUncountable(RealMatrix64F A,
                                                   RealMatrix64F B,
                                                   double tol)

        Checks to see if each element in the matrix is within tolerance of each other:

        The two matrices are identical with in tolerance if:
        |aij - bij| ≤ tol

        In addition if an element is NaN or infinite in one matrix it must be the same in the other.

        Parameters:
        A - Matrix A
        B - Matrix B
        tol - Tolerance
      • assertEquals

        public static void assertEquals(RealMatrix64F A,
                                        RealMatrix64F B,
                                        double tol)

        Checks to see if each element in the matrices are within tolerance of each other and countable:

        The two matrices are identical with in tolerance if:
        |aij - bij| ≤ tol

        The test will fail if any element in either matrix is NaN or infinite.

        Parameters:
        A - Matrix A
        B - Matrix B
        tol - Tolerance
      • assertEqualsTrans

        public static void assertEqualsTrans(RealMatrix64F A,
                                             RealMatrix64F B,
                                             double tol)

        Checks to see if the transpose of B is equal to A and countable:

        |aij - bji| ≤ tol

        The test will fail if any element in either matrix is NaN or infinite.

        Parameters:
        A - Matrix A
        B - Matrix B
        tol - Tolerance

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.