public class ModulusField extends GenericField<java.lang.Integer>
Constructor and Description |
---|
ModulusField(int modulus) |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
addG(java.lang.Integer l,
java.lang.Integer r)
Adds two elements of type E.
|
java.lang.Integer |
cast(java.lang.Object l)
Convert input to an integer in the range [0,modulus)
|
java.lang.Integer |
cmpG(java.lang.Integer l,
java.lang.Integer r)
Not implemented for this field.
|
java.lang.Integer |
convertFromInt(java.lang.Integer l)
Attempt to convert argument from an integer
|
java.lang.Integer |
convertToIntE(java.lang.Integer l)
If possible convert the argument to an Integer to enable integral powers.
|
java.lang.Integer |
divG(java.lang.Integer l,
java.lang.Integer r)
Not implemented for this field.
|
java.lang.Boolean |
eq(java.lang.Object lo,
java.lang.Object ro)
Equals
|
java.lang.Boolean |
ge(java.lang.Object l,
java.lang.Object r)
Not implemented for this field.
|
java.lang.Integer |
getOne()
Get the multiplicative identity for this field.
|
java.lang.Integer |
getZero()
Get the additive identity for this field
|
java.lang.Boolean |
gt(java.lang.Object l,
java.lang.Object r)
Not implemented for this field.
|
java.lang.Boolean |
le(java.lang.Object l,
java.lang.Object r)
Not implemented for this field.
|
java.lang.Boolean |
lt(java.lang.Object l,
java.lang.Object r)
Not implemented for this field.
|
java.lang.Integer |
modG(java.lang.Integer l,
java.lang.Integer r)
Modulus of two elements of type E.
|
java.lang.Integer |
mulG(java.lang.Integer l,
java.lang.Integer r)
Multiplies two elements of type E.
|
java.lang.Boolean |
ne(java.lang.Object lo,
java.lang.Object ro)
Not Equals
|
java.lang.Integer |
negG(java.lang.Integer l)
Negates an elements of type E.
|
java.lang.Integer |
powG(java.lang.Integer l,
java.lang.Integer r)
Raises l to the power of r
|
java.lang.Integer |
subG(java.lang.Integer l,
java.lang.Integer r)
Subtracts two elements of type E.
|
public java.lang.Integer cast(java.lang.Object l)
cast
in class GenericField<java.lang.Integer>
l
- inputpublic java.lang.Integer addG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
GenericField
addG
in class GenericField<java.lang.Integer>
l
- lhs argumentr
- rhs argumentEvaluationException
- on errorpublic java.lang.Integer subG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
GenericField
subG
in class GenericField<java.lang.Integer>
l
- lhs argumentr
- rhs argumentEvaluationException
- on errorpublic java.lang.Integer negG(java.lang.Integer l) throws EvaluationException
GenericField
negG
in class GenericField<java.lang.Integer>
l
- the argumentEvaluationException
- on errorpublic java.lang.Integer mulG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
GenericField
mulG
in class GenericField<java.lang.Integer>
l
- lhs argumentr
- rhs argumentEvaluationException
- on errorpublic java.lang.Integer divG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
divG
in class GenericField<java.lang.Integer>
l
- numeratorr
- denominatorEvaluationException
- on errorpublic java.lang.Integer modG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
GenericField
modG
in class GenericField<java.lang.Integer>
l
- lhs argumentr
- rhs argumentEvaluationException
- on errorpublic java.lang.Integer powG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
GenericField
powG
in class GenericField<java.lang.Integer>
l
- lhs argumentr
- rhs argumentEvaluationException
- on errorpublic java.lang.Integer cmpG(java.lang.Integer l, java.lang.Integer r) throws EvaluationException
cmpG
in class GenericField<java.lang.Integer>
l
- left argumentr
- right argumentEvaluationException
public java.lang.Boolean eq(java.lang.Object lo, java.lang.Object ro) throws EvaluationException
FieldI
eq
in interface FieldI
eq
in class AbstractComparativeField
lo
- left hand argumentro
- right hand argumentEvaluationException
- on errorpublic java.lang.Boolean ne(java.lang.Object lo, java.lang.Object ro) throws EvaluationException
FieldI
ne
in interface FieldI
ne
in class AbstractComparativeField
lo
- left hand argumentro
- right hand argumentEvaluationException
- on errorpublic java.lang.Boolean gt(java.lang.Object l, java.lang.Object r) throws EvaluationException
gt
in interface FieldI
gt
in class AbstractComparativeField
l
- left hand argumentr
- right hand argumentEvaluationException
- on errorpublic java.lang.Boolean ge(java.lang.Object l, java.lang.Object r) throws EvaluationException
ge
in interface FieldI
ge
in class AbstractComparativeField
l
- left hand argumentr
- right hand argumentEvaluationException
- on errorpublic java.lang.Boolean lt(java.lang.Object l, java.lang.Object r) throws EvaluationException
lt
in interface FieldI
lt
in class AbstractComparativeField
l
- left hand argumentr
- right hand argumentEvaluationException
- on errorpublic java.lang.Boolean le(java.lang.Object l, java.lang.Object r) throws EvaluationException
le
in interface FieldI
le
in class AbstractComparativeField
l
- left hand argumentr
- right hand argumentEvaluationException
- on errorpublic java.lang.Integer getOne()
FieldI
getOne
in interface FieldI
getOne
in class GenericField<java.lang.Integer>
public java.lang.Integer getZero()
FieldI
getZero
in interface FieldI
getZero
in class GenericField<java.lang.Integer>
public java.lang.Integer convertToIntE(java.lang.Integer l) throws EvaluationException
GenericField
powG(E,E)
method will be called.convertToIntE
in class GenericField<java.lang.Integer>
l
- argument to convert.EvaluationException
public java.lang.Integer convertFromInt(java.lang.Integer l) throws EvaluationException
IntegerConvertor
convertFromInt
in interface IntegerConvertor
convertFromInt
in class GenericField<java.lang.Integer>
l
- value to convertEvaluationException
Copyright © 2018 Singular Systems http://www.singularsys.com/jep