Class SequenceMatrixField
- java.lang.Object
-
- com.singularsys.extensions.matrix.AbstractMatrixField
-
- com.singularsys.extensions.matrix.sequencemat.SequenceMatrixField
-
- All Implemented Interfaces:
FieldI,IntegerConvertor,MatrixFieldI,JepComponent,java.io.Serializable
public class SequenceMatrixField extends AbstractMatrixField
A MatrixField which operates onSequenceMatrixor orDoubleVector.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.extensions.matrix.AbstractMatrixField
mf
-
-
Constructor Summary
Constructors Constructor Description SequenceMatrixField(MatrixFactoryI mf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectaddEle(java.lang.Object l, java.lang.Object r)protected MatrixIaddMM(MatrixI l, MatrixI r)protected VectorIaddVV(VectorI l, VectorI r)Add two vectorsprotected java.lang.BooleanandEle(java.lang.Object l, java.lang.Object r)java.lang.ObjectconvertFromInt(java.lang.Integer l)Attempt to convert argument from an integerjava.lang.IntegerconvertToInt(java.lang.Object l)Attempt to convert argument to an integerprotected java.lang.ObjectcrossVV(VectorI l, VectorI r)Default inefficient implementation.protected java.lang.ObjectdetM(MatrixI l)Return the determinant of a matrix.protected java.lang.ObjectdivEle(java.lang.Object l, java.lang.Object r)protected SequenceMatrixdivMO(MatrixI l, java.lang.Object r)protected VectorIdivVO(VectorI l, java.lang.Object r)protected java.lang.ObjectdotVV(VectorI l, VectorI r)Default inefficient implementation.protected java.lang.BooleaneqEle(java.lang.Object l, java.lang.Object r)protected java.lang.BooleaneqMM(MatrixI l, MatrixI r)protected java.lang.BooleaneqVV(VectorI l, VectorI r)protected java.lang.BooleangeEle(java.lang.Object l, java.lang.Object r)JepComponentgetLightWeightInstance()Returns thisjava.lang.ObjectgetOne()Get the multiplicative identity for this field.java.lang.ObjectgetZero()Get the additive identity for this fieldprotected java.lang.BooleangtEle(java.lang.Object l, java.lang.Object r)voidinit(Jep jep)Initialize the component.protected java.lang.BooleanleEle(java.lang.Object l, java.lang.Object r)protected java.lang.BooleanltEle(java.lang.Object l, java.lang.Object r)protected java.lang.ObjectmodEle(java.lang.Object l, java.lang.Object r)protected java.lang.ObjectmulEle(java.lang.Object l, java.lang.Object r)protected SequenceMatrixmulMM(MatrixI l, MatrixI r)protected SequenceMatrixmulMO(MatrixI l, java.lang.Object r)protected DoubleVectormulMV(MatrixI l, VectorI r)protected DoubleVectormulVM(VectorI l, MatrixI r)protected VectorImulVO(VectorI l, java.lang.Object r)protected MatrixImulVV(VectorI l, VectorI r)protected java.lang.BooleanneEle(java.lang.Object l, java.lang.Object r)protected java.lang.ObjectnegEle(java.lang.Object l)protected MatrixInegM(MatrixI l)protected VectorInegV(VectorI l)protected java.lang.BooleanneMM(MatrixI l, MatrixI r)protected java.lang.BooleanneVV(VectorI l, VectorI r)protected java.lang.BooleannotEle(java.lang.Object l)protected java.lang.BooleanorEle(java.lang.Object l, java.lang.Object r)protected java.lang.ObjectpowEle(java.lang.Object l, java.lang.Object r)protected java.lang.ObjectsubEle(java.lang.Object l, java.lang.Object r)protected MatrixIsubMM(MatrixI l, MatrixI r)protected VectorIsubVV(VectorI l, VectorI r)java.lang.Objecttrace(java.lang.Object mat)Trace of a matrixprotected java.lang.ObjecttransM(MatrixI l)
-
-
-
Constructor Detail
-
SequenceMatrixField
public SequenceMatrixField(MatrixFactoryI mf)
-
-
Method Detail
-
addMM
protected MatrixI addMM(MatrixI l, MatrixI r)
- Specified by:
addMMin classAbstractMatrixField
-
subMM
protected MatrixI subMM(MatrixI l, MatrixI r)
- Specified by:
subMMin classAbstractMatrixField
-
negM
protected MatrixI negM(MatrixI l)
- Specified by:
negMin classAbstractMatrixField
-
mulMO
protected SequenceMatrix mulMO(MatrixI l, java.lang.Object r)
- Specified by:
mulMOin classAbstractMatrixField
-
mulMM
protected SequenceMatrix mulMM(MatrixI l, MatrixI r)
- Specified by:
mulMMin classAbstractMatrixField
-
mulVM
protected DoubleVector mulVM(VectorI l, MatrixI r)
- Specified by:
mulVMin classAbstractMatrixField
-
mulMV
protected DoubleVector mulMV(MatrixI l, VectorI r)
- Specified by:
mulMVin classAbstractMatrixField
-
divMO
protected SequenceMatrix divMO(MatrixI l, java.lang.Object r)
- Specified by:
divMOin classAbstractMatrixField
-
detM
protected java.lang.Object detM(MatrixI l) throws EvaluationException
Description copied from class:AbstractMatrixFieldReturn the determinant of a matrix. Does not check sizes.- Overrides:
detMin classAbstractMatrixField- Parameters:
l- the matrix- Returns:
- the determinant
- Throws:
EvaluationException
-
transM
protected java.lang.Object transM(MatrixI l)
- Overrides:
transMin classAbstractMatrixField
-
addVV
protected VectorI addVV(VectorI l, VectorI r)
Description copied from class:AbstractMatrixFieldAdd two vectors- Specified by:
addVVin classAbstractMatrixField- Parameters:
l- lhs vectorr- rhs vector- Returns:
- the sum of the vectors
-
subVV
protected VectorI subVV(VectorI l, VectorI r)
- Specified by:
subVVin classAbstractMatrixField
-
negV
protected VectorI negV(VectorI l)
- Specified by:
negVin classAbstractMatrixField
-
mulVO
protected VectorI mulVO(VectorI l, java.lang.Object r)
- Specified by:
mulVOin classAbstractMatrixField
-
divVO
protected VectorI divVO(VectorI l, java.lang.Object r)
- Specified by:
divVOin classAbstractMatrixField
-
addEle
protected java.lang.Object addEle(java.lang.Object l, java.lang.Object r)- Specified by:
addElein classAbstractMatrixField
-
mulEle
protected java.lang.Object mulEle(java.lang.Object l, java.lang.Object r)- Specified by:
mulElein classAbstractMatrixField
-
subEle
protected java.lang.Object subEle(java.lang.Object l, java.lang.Object r)- Specified by:
subElein classAbstractMatrixField
-
dotVV
protected java.lang.Object dotVV(VectorI l, VectorI r) throws EvaluationException
Description copied from class:AbstractMatrixFieldDefault inefficient implementation. Will only be called if vectors are of equal lengths- Overrides:
dotVVin classAbstractMatrixField- Parameters:
l- lhs vectorr- rhs vector- Returns:
- Throws:
EvaluationException
-
mulVV
protected MatrixI mulVV(VectorI l, VectorI r) throws EvaluationException
- Specified by:
mulVVin classAbstractMatrixField- Throws:
EvaluationException
-
crossVV
protected java.lang.Object crossVV(VectorI l, VectorI r) throws EvaluationException
Description copied from class:AbstractMatrixFieldDefault inefficient implementation.- Overrides:
crossVVin classAbstractMatrixField- Throws:
EvaluationException
-
eqVV
protected java.lang.Boolean eqVV(VectorI l, VectorI r) throws EvaluationException
- Specified by:
eqVVin classAbstractMatrixField- Throws:
EvaluationException
-
neVV
protected java.lang.Boolean neVV(VectorI l, VectorI r) throws EvaluationException
- Specified by:
neVVin classAbstractMatrixField- Throws:
EvaluationException
-
eqMM
protected java.lang.Boolean eqMM(MatrixI l, MatrixI r) throws EvaluationException
- Specified by:
eqMMin classAbstractMatrixField- Throws:
EvaluationException
-
neMM
protected java.lang.Boolean neMM(MatrixI l, MatrixI r) throws EvaluationException
- Specified by:
neMMin classAbstractMatrixField- Throws:
EvaluationException
-
trace
public java.lang.Object trace(java.lang.Object mat) throws EvaluationExceptionDescription copied from class:AbstractMatrixFieldTrace of a matrix- Specified by:
tracein interfaceMatrixFieldI- Overrides:
tracein classAbstractMatrixField- Parameters:
mat- the matrix- Returns:
- the trace
- Throws:
EvaluationException
-
negEle
protected java.lang.Object negEle(java.lang.Object l) throws EvaluationException- Specified by:
negElein classAbstractMatrixField- Throws:
EvaluationException
-
divEle
protected java.lang.Object divEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
divElein classAbstractMatrixField- Throws:
EvaluationException
-
modEle
protected java.lang.Object modEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
modElein classAbstractMatrixField- Throws:
EvaluationException
-
powEle
protected java.lang.Object powEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
powElein classAbstractMatrixField- Throws:
EvaluationException
-
eqEle
protected java.lang.Boolean eqEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
eqElein classAbstractMatrixField- Throws:
EvaluationException
-
neEle
protected java.lang.Boolean neEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
neElein classAbstractMatrixField- Throws:
EvaluationException
-
leEle
protected java.lang.Boolean leEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
leElein classAbstractMatrixField- Throws:
EvaluationException
-
ltEle
protected java.lang.Boolean ltEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
ltElein classAbstractMatrixField- Throws:
EvaluationException
-
geEle
protected java.lang.Boolean geEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
geElein classAbstractMatrixField- Throws:
EvaluationException
-
gtEle
protected java.lang.Boolean gtEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
gtElein classAbstractMatrixField- Throws:
EvaluationException
-
andEle
protected java.lang.Boolean andEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
andElein classAbstractMatrixField- Throws:
EvaluationException
-
orEle
protected java.lang.Boolean orEle(java.lang.Object l, java.lang.Object r) throws EvaluationException- Specified by:
orElein classAbstractMatrixField- Throws:
EvaluationException
-
notEle
protected java.lang.Boolean notEle(java.lang.Object l) throws EvaluationException- Specified by:
notElein classAbstractMatrixField- Throws:
EvaluationException
-
getOne
public java.lang.Object getOne()
Description copied from interface:FieldIGet 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:FieldIGet 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 EvaluationExceptionDescription 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
- Throws:
EvaluationException- on error
-
convertFromInt
public java.lang.Object convertFromInt(java.lang.Integer l) throws EvaluationExceptionDescription 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
- Throws:
EvaluationException- probably never
-
init
public void init(Jep jep)
Description copied from interface:JepComponentInitialize 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'.
-
-