Package com.singularsys.exttests.matrix
Class MatrixFieldBaseTest
java.lang.Object
com.singularsys.exttests.matrix.MatrixFieldBaseTest
- Direct Known Subclasses:
BigDecimalBooleanMatrixTest,ComplexMatrixTest,DoubleComplexFieldMatrixTest,DoubleMatrixTest,ExternalMatrixTest,FieldObjectMatrixTest,MRpeMatrixFieldTest,RationalMatrixTest
Base class to check implementation of a matrix field/factory.
Implementations should override the
setUp() method a set the
mfield, mfac and numf instances.
A Jep instance can be created using
MatrixComponents mc = new MatrixComponents(mfac,mfield);
jep = new Jep(mc,numf,new StandardConfigurableParser());
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JepThe main Jep instanceprotected MatrixFactoryIMatrix factory usedprotected MatrixFieldIMatrixField usedprotected ObjectValue used to represent Trueprotected ObjectValue used to represent falseprotected NumberFactoryNumber factory usedstatic final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildMatrix(Object[][] data) buildVector(Object... data) voidcheckMatrix(String str, Object expect) voidcheckMatrix(String str, Object expect, double d) voidcheckValue(String str, Object expect) voidcheckValue(String str, Object expect, double prec) booleanbooleanequalsMatrix(Object expect, Object res) booleanequalsMatrix(Object expect, Object res, double prec) protected ObjectgetNumber(double val) Create a number of the appropriate typeprotected Objectprotected voidprintTestHeader(String str) Prints a header with the name of the test as specified in str.voidvoidvoidvoidtestEle()voidvoidEnsures the lightWeightComponents are not null.voidvoidvoidvoidvoidvoidtestSize()voidvoid
-
Field Details
-
PRINT_RESULTS
public static final boolean PRINT_RESULTS -
mfield
MatrixField used -
mfac
Matrix factory used -
numf
Number factory used -
jep
The main Jep instance -
myFalse
Value used to represent True -
myTrue
Value used to represent false
-
-
Constructor Details
-
MatrixFieldBaseTest
public MatrixFieldBaseTest()
-
-
Method Details
-
printTestHeader
Prints a header with the name of the test as specified in str. -
testMatrixOps
- Throws:
Exception
-
testIdentity
- Throws:
Exception
-
testTranspose
- Throws:
Exception
-
testMatZero
- Throws:
JepException
-
testSolve
- Throws:
JepException
-
checkMatrix
- Throws:
JepException
-
testSize
- Throws:
JepException
-
testEle
- Throws:
JepException
-
testMatrixEquality
- Throws:
Exception
-
testMatNaN
- Throws:
JepException
-
getNumber
Create a number of the appropriate type- Parameters:
val- input- Returns:
- converted number
-
buildMatrix
- Throws:
EvaluationExceptionParseException
-
buildVector
- Throws:
EvaluationExceptionParseException
-
getNumber
- Throws:
ParseException
-
checkMatrix
- Throws:
JepException
-
checkValue
- Throws:
JepException
-
checkValue
- Throws:
JepException
-
equalsMatrix
- Throws:
EvaluationException
-
equalsEle
-
equalsMatrix
- Throws:
EvaluationException
-
test_solve_with_invalid_argument_throw_exceptions
- Throws:
EvaluationException
-
testMismatched_returns_null
- Throws:
EvaluationException
-
testDuplicate
- Throws:
EvaluationExceptionParseException
-
testLightWeightComponents
@Test public void testLightWeightComponents()Ensures the lightWeightComponents are not null. -
test_serialization_of_vectors_and_matrices
- Throws:
Exception
-