public class RationalField extends GenericPowerField<Rational>
RationalNumberFactory,
Rational,
Serialized Formone, zero| Constructor and Description |
|---|
RationalField() |
| Modifier and Type | Method and Description |
|---|---|
Rational |
addG(Rational l,
Rational r)
Adds two elements of type E.
|
Rational |
cast(java.lang.Object l)
Convert the input to type E.
|
java.lang.Integer |
cmpG(Rational l,
Rational r)
Compare two objects of the same type.
|
Rational |
convertFromInt(java.lang.Integer l)
Attempt to convert argument from an integer
|
java.lang.Integer |
convertToIntE(Rational r)
If possible convert the argument to an Integer to enable integral powers.
|
Rational |
divG(Rational l,
Rational r)
Divides two elements of type E.
|
Rational |
getOne()
Get the multiplicative identity for this field.
|
Rational |
getZero()
Get the additive identity for this field
|
Rational |
modG(Rational l,
Rational r)
Modulus of two elements of type E.
|
Rational |
mulG(Rational l,
Rational r)
Multiplies two elements of type E.
|
Rational |
negG(Rational l)
Negates an elements of type E.
|
Rational |
powNonInt(Rational l,
Rational r)
Power only implemented for integral powers.
|
Rational |
subG(Rational l,
Rational r)
Subtracts two elements of type E.
|
powG, powIadd, and, cmp, convertToInt, div, mod, mul, neg, not, or, pow, subpublic Rational cast(java.lang.Object l)
GenericFieldcast in class GenericField<Rational>public Rational addG(Rational l, Rational r) throws EvaluationException
GenericFieldaddG in class GenericField<Rational>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic java.lang.Integer cmpG(Rational l, Rational r) throws EvaluationException
GenericFieldcmpG in class GenericField<Rational>l - left argumentr - right argumentEvaluationExceptionpublic Rational divG(Rational l, Rational r) throws EvaluationException
GenericFielddivG in class GenericField<Rational>l - numeratorr - denominatorEvaluationException - on errorpublic Rational modG(Rational l, Rational r) throws EvaluationException
GenericFieldmodG in class GenericField<Rational>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic Rational mulG(Rational l, Rational r) throws EvaluationException
GenericFieldmulG in class GenericField<Rational>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic Rational negG(Rational l) throws EvaluationException
GenericFieldnegG in class GenericField<Rational>l - the argumentEvaluationException - on errorpublic Rational powNonInt(Rational l, Rational r) throws EvaluationException
powNonInt in class GenericPowerField<Rational>EvaluationExceptionpublic Rational subG(Rational l, Rational r) throws EvaluationException
GenericFieldsubG in class GenericField<Rational>l - lhs argumentr - rhs argumentEvaluationException - on errorpublic Rational convertFromInt(java.lang.Integer l) throws EvaluationException
IntegerConvertorconvertFromInt in interface IntegerConvertorconvertFromInt in class GenericField<Rational>l - value to convertEvaluationExceptionpublic Rational getOne()
FieldIgetOne in interface FieldIgetOne in class GenericField<Rational>public Rational getZero()
FieldIgetZero in interface FieldIgetZero in class GenericField<Rational>public java.lang.Integer convertToIntE(Rational r) throws EvaluationException
GenericFieldpowG(E,E)
method will be called.convertToIntE in class GenericField<Rational>r - argument to convert.EvaluationExceptionCopyright © 2018 Singular Systems http://www.singularsys.com/jep