Class DoubleMatrixField
- java.lang.Object
-
- com.singularsys.extensions.matrix.AbstractMatrixField
-
- com.singularsys.extensions.matrix.doublemat.DoubleMatrixField
-
- All Implemented Interfaces:
FieldI
,IntegerConvertor
,MatrixFieldI
,JepComponent
,java.io.Serializable
public class DoubleMatrixField extends AbstractMatrixField
A field operating onDoubleMatrix
andDoubleVector
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.extensions.matrix.AbstractMatrixField
mf
-
-
Constructor Summary
Constructors Constructor Description DoubleMatrixField(MatrixFactoryI mf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
addEle(java.lang.Object l, java.lang.Object r)
protected MatrixI
addMM(MatrixI l, MatrixI r)
protected VectorI
addVV(VectorI l, VectorI r)
Add two vectorsprotected java.lang.Boolean
andEle(java.lang.Object l, java.lang.Object r)
java.lang.Object
convertFromInt(java.lang.Integer l)
Attempt to convert argument from an integerjava.lang.Integer
convertToInt(java.lang.Object l)
Attempt to convert argument to an integerprotected java.lang.Object
crossVV(VectorI l, VectorI r)
Default inefficient implementation.protected java.lang.Object
detM(MatrixI l)
Return the determinant of a matrix.protected java.lang.Object
divEle(java.lang.Object l, java.lang.Object r)
protected DoubleMatrix
divMO(MatrixI l, java.lang.Object r)
protected VectorI
divVO(VectorI l, java.lang.Object r)
protected java.lang.Object
dotVV(VectorI l, VectorI r)
Default inefficient implementation.protected java.lang.Boolean
eqEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Boolean
eqMM(MatrixI l, MatrixI r)
protected java.lang.Boolean
eqVV(VectorI l, VectorI r)
protected java.lang.Boolean
geEle(java.lang.Object l, java.lang.Object r)
JepComponent
getLightWeightInstance()
Returns thisjava.lang.Object
getOne()
Get the multiplicative identity for this field.java.lang.Object
getZero()
Get the additive identity for this fieldprotected java.lang.Boolean
gtEle(java.lang.Object l, java.lang.Object r)
void
init(Jep jep)
Initialize the component.protected java.lang.Boolean
leEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Boolean
ltEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Object
modEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Object
mulEle(java.lang.Object l, java.lang.Object r)
protected DoubleMatrix
mulMM(MatrixI l, MatrixI r)
protected DoubleMatrix
mulMO(MatrixI l, java.lang.Object r)
protected DoubleVector
mulMV(MatrixI l, VectorI r)
protected DoubleVector
mulVM(VectorI l, MatrixI r)
protected VectorI
mulVO(VectorI l, java.lang.Object r)
protected MatrixI
mulVV(VectorI l, VectorI r)
protected java.lang.Boolean
neEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Object
negEle(java.lang.Object l)
protected MatrixI
negM(MatrixI l)
protected VectorI
negV(VectorI l)
protected java.lang.Boolean
neMM(MatrixI l, MatrixI r)
protected java.lang.Boolean
neVV(VectorI l, VectorI r)
protected java.lang.Boolean
notEle(java.lang.Object l)
protected java.lang.Boolean
orEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Object
powEle(java.lang.Object l, java.lang.Object r)
protected java.lang.Object
subEle(java.lang.Object l, java.lang.Object r)
protected MatrixI
subMM(MatrixI l, MatrixI r)
protected VectorI
subVV(VectorI l, VectorI r)
java.lang.Object
trace(java.lang.Object mat)
Trace of a matrixprotected java.lang.Object
transM(MatrixI l)
-
-
-
Constructor Detail
-
DoubleMatrixField
public DoubleMatrixField(MatrixFactoryI mf)
-
-
Method Detail
-
addMM
protected MatrixI addMM(MatrixI l, MatrixI r)
- Specified by:
addMM
in classAbstractMatrixField
-
subMM
protected MatrixI subMM(MatrixI l, MatrixI r)
- Specified by:
subMM
in classAbstractMatrixField
-
negM
protected MatrixI negM(MatrixI l)
- Specified by:
negM
in classAbstractMatrixField
-
mulMO
protected DoubleMatrix mulMO(MatrixI l, java.lang.Object r)
- Specified by:
mulMO
in classAbstractMatrixField
-
mulMM
protected DoubleMatrix mulMM(MatrixI l, MatrixI r)
- Specified by:
mulMM
in classAbstractMatrixField
-
mulVM
protected DoubleVector mulVM(VectorI l, MatrixI r)
- Specified by:
mulVM
in classAbstractMatrixField
-
mulMV
protected DoubleVector mulMV(MatrixI l, VectorI r)
- Specified by:
mulMV
in classAbstractMatrixField
-
divMO
protected DoubleMatrix divMO(MatrixI l, java.lang.Object r)
- Specified by:
divMO
in classAbstractMatrixField
-
detM
protected java.lang.Object detM(MatrixI l) throws EvaluationException
Description copied from class:AbstractMatrixField
Return the determinant of a matrix. Does not check sizes.- Overrides:
detM
in classAbstractMatrixField
- Parameters:
l
- the matrix- Returns:
- the determinant
- Throws:
EvaluationException
-
transM
protected java.lang.Object transM(MatrixI l)
- Overrides:
transM
in classAbstractMatrixField
-
addVV
protected VectorI addVV(VectorI l, VectorI r)
Description copied from class:AbstractMatrixField
Add two vectors- Specified by:
addVV
in classAbstractMatrixField
- Parameters:
l
- lhs vectorr
- rhs vector- Returns:
- the sum of the vectors
-
subVV
protected VectorI subVV(VectorI l, VectorI r)
- Specified by:
subVV
in classAbstractMatrixField
-
negV
protected VectorI negV(VectorI l)
- Specified by:
negV
in classAbstractMatrixField
-
mulVO
protected VectorI mulVO(VectorI l, java.lang.Object r)
- Specified by:
mulVO
in classAbstractMatrixField
-
divVO
protected VectorI divVO(VectorI l, java.lang.Object r)
- Specified by:
divVO
in classAbstractMatrixField
-
addEle
protected java.lang.Object addEle(java.lang.Object l, java.lang.Object r)
- Specified by:
addEle
in classAbstractMatrixField
-
mulEle
protected java.lang.Object mulEle(java.lang.Object l, java.lang.Object r)
- Specified by:
mulEle
in classAbstractMatrixField
-
subEle
protected java.lang.Object subEle(java.lang.Object l, java.lang.Object r)
- Specified by:
subEle
in classAbstractMatrixField
-
dotVV
protected java.lang.Object dotVV(VectorI l, VectorI r) throws EvaluationException
Description copied from class:AbstractMatrixField
Default inefficient implementation. Will only be called if vectors are of equal lengths- Overrides:
dotVV
in classAbstractMatrixField
- Parameters:
l
- lhs vectorr
- rhs vector- Returns:
- Throws:
EvaluationException
-
mulVV
protected MatrixI mulVV(VectorI l, VectorI r) throws EvaluationException
- Specified by:
mulVV
in classAbstractMatrixField
- Throws:
EvaluationException
-
crossVV
protected java.lang.Object crossVV(VectorI l, VectorI r) throws EvaluationException
Description copied from class:AbstractMatrixField
Default inefficient implementation.- Overrides:
crossVV
in classAbstractMatrixField
- Throws:
EvaluationException
-
eqVV
protected java.lang.Boolean eqVV(VectorI l, VectorI r) throws EvaluationException
- Specified by:
eqVV
in classAbstractMatrixField
- Throws:
EvaluationException
-
neVV
protected java.lang.Boolean neVV(VectorI l, VectorI r) throws EvaluationException
- Specified by:
neVV
in classAbstractMatrixField
- Throws:
EvaluationException
-
eqMM
protected java.lang.Boolean eqMM(MatrixI l, MatrixI r) throws EvaluationException
- Specified by:
eqMM
in classAbstractMatrixField
- Throws:
EvaluationException
-
neMM
protected java.lang.Boolean neMM(MatrixI l, MatrixI r) throws EvaluationException
- Specified by:
neMM
in classAbstractMatrixField
- Throws:
EvaluationException
-
trace
public java.lang.Object trace(java.lang.Object mat) throws EvaluationException
Description copied from class:AbstractMatrixField
Trace of a matrix- Specified by:
trace
in interfaceMatrixFieldI
- Overrides:
trace
in classAbstractMatrixField
- Parameters:
mat
- the matrix- Returns:
- the trace
- Throws:
EvaluationException
-
negEle
protected java.lang.Object negEle(java.lang.Object l) throws EvaluationException
- Specified by:
negEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
divEle
protected java.lang.Object divEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
divEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
modEle
protected java.lang.Object modEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
modEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
powEle
protected java.lang.Object powEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
powEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
eqEle
protected java.lang.Boolean eqEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
eqEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
neEle
protected java.lang.Boolean neEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
neEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
leEle
protected java.lang.Boolean leEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
leEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
ltEle
protected java.lang.Boolean ltEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
ltEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
geEle
protected java.lang.Boolean geEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
geEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
gtEle
protected java.lang.Boolean gtEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
gtEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
andEle
protected java.lang.Boolean andEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
andEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
orEle
protected java.lang.Boolean orEle(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
orEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
notEle
protected java.lang.Boolean notEle(java.lang.Object l) throws EvaluationException
- Specified by:
notEle
in classAbstractMatrixField
- Throws:
EvaluationException
-
getOne
public java.lang.Object getOne()
Description copied from interface:FieldI
Get the multiplicative identity for this field.- Returns:
- object representing one or null if undefined for this field
-
getZero
public java.lang.Object getZero()
Description copied from interface:FieldI
Get the additive identity for this field- Returns:
- object representing zero or null if undefined for this field
-
convertToInt
public java.lang.Integer convertToInt(java.lang.Object l) throws EvaluationException
Description copied from interface:IntegerConvertor
Attempt to convert argument to an integer- Parameters:
l
- value to convert- Returns:
- corresponding integer or null if it cannot be converted
- Throws:
EvaluationException
- on error
-
convertFromInt
public java.lang.Object convertFromInt(java.lang.Integer l) throws EvaluationException
Description copied from interface:IntegerConvertor
Attempt to convert argument from an integer- Parameters:
l
- value to convert- Returns:
- corresponding value in this field or null if it cannot be converted
- Throws:
EvaluationException
- probably never
-
init
public void init(Jep jep)
Description copied from interface:JepComponent
Initialize the component. This methods 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
public JepComponent getLightWeightInstance()
Returns this- Returns:
- either an new instance, null or 'this'.
-
-