E
- base type for elementspublic class GenericFieldMatrixField<E> extends GenericMatrixField<E>
GenericPowerField
of type E.
Generally there is no need to provide a concrete subclass
just using
RationalField rf = new RationalField(); MatrixFactoryI mfact = new GenericMatrixFactory<>(rf); MatrixFieldI mfield = new GenericFieldMatrixField<>(mfact,rf);
A concrete implementation would just need to provide a constructor.
An example use is at RationalMatrixTest2
.
GenericMatrixFactory
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected GenericField<E> |
base |
mf
Constructor and Description |
---|
GenericFieldMatrixField(GenericMatrixFactory<E> mf,
GenericField<E> base)
Standard constructor.
|
GenericFieldMatrixField(GenericMatrixFactory<E> mf,
GenericPowerField<E> base,
boolean skipElements)
Constructor where operations on the base field can be switched off.
|
GenericFieldMatrixField(MatrixFactoryI mf,
GenericField<E> base)
Constructor which is easier to use, but has an unchecked cast.
|
Modifier and Type | Method and Description |
---|---|
protected E |
addEle(E l,
E r)
Adds two elements of the vector/matrix
|
protected java.lang.Boolean |
andEle(E l,
E r) |
java.lang.Object |
convertFromInt(java.lang.Integer l)
Attempt to convert argument from an integer
|
java.lang.Integer |
convertToInt(java.lang.Object l)
Attempt to convert argument to an integer
|
protected E |
divEle(E l,
E r) |
protected java.lang.Boolean |
eqEle(E l,
E r) |
java.lang.Boolean |
geEle(E l,
E r) |
E |
getOne()
Get the multiplicative identity for this field.
|
E |
getZero()
Get the additive identity for this field
|
java.lang.Boolean |
gtEle(E l,
E r) |
java.lang.Boolean |
leEle(E l,
E r) |
java.lang.Boolean |
ltEle(E l,
E r) |
protected E |
modEle(E l,
E r) |
protected E |
mulEle(E l,
E r) |
java.lang.Boolean |
neEle(E l,
E r) |
protected E |
negEle(E l) |
protected java.lang.Boolean |
notEle(E l) |
protected java.lang.Boolean |
orEle(E l,
E r) |
protected E |
powEle(E l,
E r) |
protected E |
subEle(E l,
E r) |
add, add, add, and, calcSize, cmpSize, cross, cross, det, det, div, div, div, dot, dot, eq, eq, eq, ge, getLightWeightInstance, gt, init, 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
protected GenericField<E> base
public GenericFieldMatrixField(GenericMatrixFactory<E> mf, GenericField<E> base)
mf
- The factory used to generate matricesbase
- base field for calculations on elementspublic GenericFieldMatrixField(MatrixFactoryI mf, GenericField<E> base)
GenericFieldMatrixField(GenericMatrixFactory, GenericPowerField, boolean)
constructor to ensure type safety.mf
- base
- public GenericFieldMatrixField(GenericMatrixFactory<E> mf, GenericPowerField<E> base, boolean skipElements)
mf
- The factory used to generate matricesbase
- base field for calculations on elementsskipElements
- whether to skip operations on the base elementsprotected E addEle(E l, E r) throws EvaluationException
GenericMatrixField
addEle
in class GenericMatrixField<E>
l
- lhs elementr
- rhs elementEvaluationException
protected E subEle(E l, E r) throws EvaluationException
subEle
in class GenericMatrixField<E>
EvaluationException
protected E negEle(E l) throws EvaluationException
negEle
in class GenericMatrixField<E>
EvaluationException
protected E mulEle(E l, E r) throws EvaluationException
mulEle
in class GenericMatrixField<E>
EvaluationException
protected E modEle(E l, E r) throws EvaluationException
modEle
in class GenericMatrixField<E>
EvaluationException
protected E divEle(E l, E r) throws EvaluationException
divEle
in class GenericMatrixField<E>
EvaluationException
protected E powEle(E l, E r) throws EvaluationException
powEle
in class GenericMatrixField<E>
EvaluationException
protected java.lang.Boolean eqEle(E l, E r) throws EvaluationException
eqEle
in class GenericMatrixField<E>
EvaluationException
public java.lang.Boolean neEle(E l, E r) throws EvaluationException
neEle
in class GenericMatrixField<E>
EvaluationException
public java.lang.Boolean gtEle(E l, E r) throws EvaluationException
gtEle
in class GenericMatrixField<E>
EvaluationException
public java.lang.Boolean geEle(E l, E r) throws EvaluationException
geEle
in class GenericMatrixField<E>
EvaluationException
public java.lang.Boolean ltEle(E l, E r) throws EvaluationException
ltEle
in class GenericMatrixField<E>
EvaluationException
public java.lang.Boolean leEle(E l, E r) throws EvaluationException
leEle
in class GenericMatrixField<E>
EvaluationException
protected java.lang.Boolean andEle(E l, E r) throws EvaluationException
andEle
in class GenericMatrixField<E>
EvaluationException
protected java.lang.Boolean orEle(E l, E r) throws EvaluationException
orEle
in class GenericMatrixField<E>
EvaluationException
protected java.lang.Boolean notEle(E l) throws EvaluationException
notEle
in class GenericMatrixField<E>
EvaluationException
public E getZero()
FieldI
getZero
in interface FieldI
getZero
in class GenericMatrixField<E>
public E getOne()
FieldI
getOne
in interface FieldI
getOne
in class GenericMatrixField<E>
public java.lang.Object convertFromInt(java.lang.Integer l) throws EvaluationException
IntegerConvertor
l
- value to convertEvaluationException
public java.lang.Integer convertToInt(java.lang.Object l) throws EvaluationException
IntegerConvertor
l
- value to convertEvaluationException
Copyright © 2018 Singular Systems http://www.singularsys.com/jep