Class GenericPowerField<E>
java.lang.Object
com.singularsys.extensions.field.AbstractComparativeField
com.singularsys.extensions.field.implementations.GenericField<E>
com.singularsys.extensions.field.implementations.GenericPowerField<E>
- Type Parameters:
E- Basic type field uses, e.g. Double or Complex.
- All Implemented Interfaces:
FieldI,IntegerConvertor,Serializable
- Direct Known Subclasses:
ExactIntegerField,LongField,RationalField,ShortField
Provides a standard
E powI(E l, Integer r) method for integer powers.
Subclasses must implement Integer convertToInt(Object l)- Author:
- Richard Morris
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.extensions.field.implementations.GenericField
add, addG, and, cast, cmp, cmpG, convertFromInt, convertToInt, convertToIntE, div, divG, getOne, getZero, mod, modG, mul, mulG, neg, negG, not, or, pow, sub, subG
-
Field Details
-
zero
-
one
-
-
Constructor Details
-
GenericPowerField
-
-
Method Details
-
powG
If r is integral (convertToInt returns non-null) call powI otherwise call powNI- Specified by:
powGin classGenericField<E>- Parameters:
l- lhs argumentr- rhs argument- Returns:
- the power
- Throws:
EvaluationException- on error
-
powNonInt
Called when the power is not an integer- Parameters:
l-r-- Returns:
- Throws:
EvaluationException
-
powI
- Throws:
EvaluationException
-