|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ejml.ops.EjmlUnitTests
public class EjmlUnitTests
Contains various functions related to unit testing matrix operations.
| Nested Class Summary | |
|---|---|
static class |
EjmlUnitTests.TestException
|
| Constructor Summary | |
|---|---|
EjmlUnitTests()
|
|
| Method Summary | |
|---|---|
static void |
assertCountable(Matrix64F A)
Checks to see if every element in A is countable. |
static void |
assertEquals(Matrix64F A,
Matrix64F B,
double tol)
Checks to see if each element in the matrices are within tolerance of each other and countable: |
static void |
assertEqualsTrans(Matrix64F A,
Matrix64F B,
double tol)
Checks to see if the transpose of B is equal to A and countable: |
static void |
assertEqualsUncountable(Matrix64F A,
Matrix64F B,
double tol)
Checks to see if each element in the matrix is within tolerance of each other: |
static void |
assertShape(Matrix64F A,
int numRows,
int numCols)
Checks to see if the matrix has the specified number of rows and columns. |
static void |
assertShape(Matrix64F A,
Matrix64F B)
Checks to see if A and B have the same shape. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EjmlUnitTests()
| Method Detail |
|---|
public static void assertCountable(Matrix64F A)
A - Matrix
public static void assertShape(Matrix64F A,
Matrix64F B)
Checks to see if A and B have the same shape.
A - MatrixB - Matrix
public static void assertShape(Matrix64F A,
int numRows,
int numCols)
Checks to see if the matrix has the specified number of rows and columns.
A - MatrixnumRows - expected number of rows in the matrixnumCols - expected number of columns in the matrix
public static void assertEqualsUncountable(Matrix64F A,
Matrix64F 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 - Tolerance
public static void assertEquals(Matrix64F A,
Matrix64F 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
public static void assertEqualsTrans(Matrix64F A,
Matrix64F 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.
A - Matrix AB - Matrix Btol - Tolerance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||