org.ejml.simple
Class SimpleUnitTests
- java.lang.Object
-
- org.ejml.simple.SimpleUnitTests
-
public class SimpleUnitTests extends java.lang.ObjectUnit testing functions forSimpleMatrix
-
-
Constructor Summary
Constructors Constructor and Description SimpleUnitTests()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidassertCountable(SimpleMatrix A)Checks to see if every element in A is countable.static voidassertEquals(SimpleMatrix A, SimpleMatrix B, double tol)Checks to see if each element in the matrices are within tolerance of each other and countable:static voidassertEqualsUncountable(SimpleMatrix A, SimpleMatrix B, double tol)Checks to see if each element in the matrix is within tolerance of each other:static voidassertShape(SimpleMatrix A, SimpleMatrix B)Checks to see if A and B have the same shape.
-
-
-
Method Detail
-
assertCountable
public static void assertCountable(SimpleMatrix 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(SimpleMatrix A, SimpleMatrix B)
Checks to see if A and B have the same shape.
- Parameters:
A- MatrixB- Matrix
-
assertEqualsUncountable
public static void assertEqualsUncountable(SimpleMatrix A, SimpleMatrix 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| ≤ tolIn addition if an element is NaN or infinite in one matrix it must be the same in the other.
- Parameters:
A- Matrix AB- Matrix Btol- Tolerance
-
assertEquals
public static void assertEquals(SimpleMatrix A, SimpleMatrix 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| ≤ tolThe test will fail if any element in either matrix is NaN or infinite.
- Parameters:
A- Matrix AB- Matrix Btol- Tolerance
-
-
DMelt 3.0 © DataMelt by jWork.ORG