Class SimpleMatrixField
java.lang.Object
com.singularsys.extensions.matrix.genericmat.GenericMatrixField<Object>
com.singularsys.extensions.matrix.objectmat.SimpleMatrixField
- All Implemented Interfaces:
FieldI,IntegerConvertor,MatrixFieldI,JepComponent,Serializable
An implementation using the default Jep methods for evaluation of elements of a matrix.
so to add two elements it will use the
Add class.
MatrixFactoryI mfac = new ObjectMatrixFactory();
MatrixFieldI mf = new SimpleMatrixField(mfac);
MatrixOperatorTable opTab = new MatrixOperatorTable(mfac, mf);
MatrixFunctionTable mftab = new MatrixFunctionTable(mfac, mf);
jep = new Jep(opTab,mftab);
- See Also:
-
Field Summary
Fields inherited from class com.singularsys.extensions.matrix.genericmat.GenericMatrixField
mf -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectAdds two elements of the vector/matrixprotected BooleanAttempt to convert argument from an integerAttempt to convert argument to an integerprotected Objectprotected Booleanprotected BooleanReturns thisgetOne()Get the multiplicative identity for this field.getZero()Get the additive identity for this fieldprotected BooleanvoidInitialize the component.protected Booleanprotected Booleanprotected Objectprotected Objectprotected Booleanprotected Objectprotected Booleanprotected Booleanprotected Objectprotected ObjectMethods inherited from class com.singularsys.extensions.matrix.genericmat.GenericMatrixField
add, add, add, and, calcSize, cmpSize, cross, cross, det, det, div, div, div, dot, dot, elementValue, eq, eq, eq, ge, gt, inv, invMat, le, lt, minor, mod, mul, mul, mul, mul, mul, mul, mul, ne, neg, neg, neg, not, or, pow, solve, solveMM, solveMV, sub, sub, sub, subtractMul, swapRows, trace, trace, trans, trans, trans
-
Constructor Details
-
SimpleMatrixField
- Parameters:
mf-
-
-
Method Details
-
addEle
Description copied from class:GenericMatrixFieldAdds two elements of the vector/matrix- Specified by:
addElein classGenericMatrixField<Object>- Parameters:
l- lhs elementr- rhs element- Returns:
- their sum
- Throws:
EvaluationException
-
subEle
- Specified by:
subElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
negEle
- Specified by:
negElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
mulEle
- Specified by:
mulElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
divEle
- Specified by:
divElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
modEle
- Specified by:
modElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
powEle
- Specified by:
powElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
eqEle
- Specified by:
eqElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
neEle
- Specified by:
neElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
ltEle
- Specified by:
ltElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
leEle
- Specified by:
leElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
gtEle
- Specified by:
gtElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
geEle
- Specified by:
geElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
andEle
- Specified by:
andElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
orEle
- Specified by:
orElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
notEle
- Specified by:
notElein classGenericMatrixField<Object>- Throws:
EvaluationException
-
getZero
Description copied from interface:FieldIGet the additive identity for this field- Specified by:
getZeroin interfaceFieldI- Specified by:
getZeroin classGenericMatrixField<Object>- Returns:
- object representing zero or null if undefined for this field
-
getOne
Description copied from interface:FieldIGet the multiplicative identity for this field.- Specified by:
getOnein interfaceFieldI- Specified by:
getOnein classGenericMatrixField<Object>- Returns:
- object representing one or null if undefined for this field
-
convertToInt
Description copied from interface:IntegerConvertorAttempt to convert argument to an integer- Parameters:
l- value to convert- Returns:
- corresponding integer or null if it cannot be converted
-
convertFromInt
Description copied from interface:IntegerConvertorAttempt to convert argument from an integer- Parameters:
l- value to convert- Returns:
- corresponding value in this field or null if it cannot be converted
-
init
Description copied from interface:JepComponentInitialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.- Parameters:
jep- the current Jep instance
-
getLightWeightInstance
Returns this- Specified by:
getLightWeightInstancein interfaceJepComponent- Overrides:
getLightWeightInstancein classGenericMatrixField<Object>- Returns:
- either a new instance, null or 'this'.
-