Class AbstractField<T extends NativeOperators<T>>
java.lang.Object
org.apache.commons.numbers.field.AbstractField<T>
- Type Parameters:
T- Type of the field elements.
- All Implemented Interfaces:
Field<T>
- Direct Known Subclasses:
BigFractionField, DDField, FP64Field, FractionField
public abstract class AbstractField<T extends NativeOperators<T>>
extends Object
implements Field<T>
Boiler-plate code for concrete implementations of
Field.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd the elements.Divide the elementabyb.Multiply the elementaby a specified number of timesn.Multiply the elements.Negate the element.reciprocal(T a) Return the reciprocal (multiplicative inverse).Subtract the elementbfroma.
-
Constructor Details
-
AbstractField
public AbstractField()Create an instance.
-
-
Method Details
-
add
-
subtract
-
negate
-
multiply
-
multiply
-
divide
-
reciprocal
Return the reciprocal (multiplicative inverse).- Specified by:
reciprocalin interfaceField<T extends NativeOperators<T>>- Parameters:
a- Field element.- Returns:
a-1.
-