Class MatrixCmp
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.BinaryFunction
-
- com.singularsys.jep.functions.Comparative
-
- com.singularsys.extensions.matrix.functions.MatrixCmp
-
- All Implemented Interfaces:
MatrixFunctionI
,PostfixMathCommandI
,java.io.Serializable
public class MatrixCmp extends Comparative implements MatrixFunctionI
Compare two elements using a MatrixField.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description MatrixCmp(MatrixFieldI mfact, int id_in)
MatrixCmp(MatrixFieldI mfact, int id, double tolerance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dimensions
calcDims(Dimensions... inDims)
Attempts to calculate the dimensions of a result of a PostfixMathCommand.boolean
eq(java.lang.Object l, java.lang.Object r)
boolean
ge(java.lang.Object l, java.lang.Object r)
boolean
gt(java.lang.Object l, java.lang.Object r)
boolean
le(java.lang.Object l, java.lang.Object r)
boolean
lt(java.lang.Object l, java.lang.Object r)
boolean
ne(java.lang.Object l, java.lang.Object r)
-
Methods inherited from class com.singularsys.jep.functions.Comparative
compare, eval, getId, getTolerance, setTolerance
-
Methods inherited from class com.singularsys.jep.functions.BinaryFunction
instanceOf, instanceOf, run
-
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
-
-
-
Constructor Detail
-
MatrixCmp
public MatrixCmp(MatrixFieldI mfact, int id, double tolerance)
- Parameters:
id
-tolerance
-
-
MatrixCmp
public MatrixCmp(MatrixFieldI mfact, int id_in)
- Parameters:
id_in
-
-
-
Method Detail
-
eq
public boolean eq(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Overrides:
eq
in classComparative
- Throws:
EvaluationException
-
ne
public boolean ne(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Overrides:
ne
in classComparative
- Throws:
EvaluationException
-
ge
public boolean ge(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Overrides:
ge
in classComparative
- Throws:
EvaluationException
-
gt
public boolean gt(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Overrides:
gt
in classComparative
- Throws:
EvaluationException
-
le
public boolean le(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Overrides:
le
in classComparative
- Throws:
EvaluationException
-
lt
public boolean lt(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Overrides:
lt
in classComparative
- Throws:
EvaluationException
-
calcDims
public Dimensions calcDims(Dimensions... inDims) throws ParseException
Description copied from interface:MatrixFunctionI
Attempts to calculate the dimensions of a result of a PostfixMathCommand.- Specified by:
calcDims
in interfaceMatrixFunctionI
- Parameters:
inDims
- the dimensions of each argument- Returns:
- the dimension of the result or null if can be calculated
- Throws:
ParseException
- if there is a parse error
-
-