Class EjmlUnitTests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks to see if every element in A is countable.static voidassertEquals(CMatrix A, CMatrix B, float tol) static voidassertEquals(Complex_F32 a, Complex_F32 b, float tol) static voidassertEquals(Complex_F64 a, Complex_F64 b, double tol) static voidassertEquals(DMatrix A, DMatrix B, double tol) Checks to see if each element in the matrices are within tolerance of each other and countable:static voidassertEquals(FMatrix A, FMatrix B, float tol) static voidassertEquals(Matrix A, Matrix B) static voidassertEquals(ZMatrix A, ZMatrix B, double tol) static voidassertEqualsTrans(DMatrix A, DMatrix B, double tol) Checks to see if the transpose of B is equal to A and countable:static voidassertEqualsTrans(FMatrix A, FMatrix B, double tol) static voidassertEqualsUncountable(DMatrix A, DMatrix B, double tol) Checks to see if each element in the matrix is within tolerance of each other:static voidassertRelativeEquals(DMatrix expected, DMatrix found, double tol) Assert equals with a relative errorstatic voidassertRelativeEquals(FMatrix expected, FMatrix found, double tol) Assert equals with a relative errorstatic voidassertShape(Matrix A, int numRows, int numCols) Checks to see if the matrix has the specified number of rows and columns.static voidassertShape(Matrix A, Matrix B) Checks to see if A and B have the same shape.
-
Constructor Details
-
EjmlUnitTests
public EjmlUnitTests()
-
-
Method Details
-
assertCountable
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
Checks to see if A and B have the same shape.
- Parameters:
A- MatrixB- Matrix
-
assertShape
Checks to see if the matrix has the specified number of rows and columns.
- Parameters:
A- MatrixnumRows- expected number of rows in the matrixnumCols- expected number of columns in the matrix
-
assertEqualsUncountable
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
-
assertEquals
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
-
assertRelativeEquals
Assert equals with a relative error -
assertRelativeEquals
Assert equals with a relative error -
assertEquals
-
assertEquals
-
assertEquals
-
assertEquals
-
assertEquals
-
assertEqualsTrans
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 AB- Matrix Btol- Tolerance
-
assertEqualsTrans
-