public class SimpleUnitTests
extends java.lang.Object
SimpleMatrix| Constructor and Description |
|---|
SimpleUnitTests() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertCountable(SimpleMatrix A)
Checks to see if every element in A is countable.
|
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:
|
static void |
assertEqualsUncountable(SimpleMatrix A,
SimpleMatrix B,
double tol)
Checks to see if each element in the matrix is within tolerance of each other:
|
static void |
assertShape(SimpleMatrix A,
SimpleMatrix B)
Checks to see if A and B have the same shape.
|
public static void assertCountable(SimpleMatrix A)
A - Matrixpublic static void assertShape(SimpleMatrix A, SimpleMatrix B)
Checks to see if A and B have the same shape.
A - MatrixB - Matrixpublic 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| ≤ tol
In addition if an element is NaN or infinite in one matrix it must be the same in the other.
A - Matrix AB - Matrix Btol - Tolerancepublic 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| ≤ tol
The test will fail if any element in either matrix is NaN or infinite.
A - Matrix AB - Matrix Btol - Tolerance