Package edu.jas.commons.math
Class CMFieldElement<C extends edu.jas.structure.RingElem<C>>
- java.lang.Object
-
- edu.jas.commons.math.CMFieldElement<C>
-
- Type Parameters:
C- JAS ring element type
- All Implemented Interfaces:
java.lang.Comparable<CMFieldElement<C>>,org.apache.commons.math3.FieldElement<CMFieldElement<C>>
public class CMFieldElement<C extends edu.jas.structure.RingElem<C>> extends java.lang.Object implements org.apache.commons.math3.FieldElement<CMFieldElement<C>>, java.lang.Comparable<CMFieldElement<C>>
Class that wraps a JASRingElemin a commons-mathFieldElement.- Author:
- Heinz Kredel
-
-
Constructor Summary
Constructors Constructor Description CMFieldElement(C v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMFieldElement<C>add(CMFieldElement<C> other)intcompareTo(CMFieldElement<C> other)CMFieldElement<C>divide(CMFieldElement<C> other)booleanequals(java.lang.Object obj)org.apache.commons.math3.Field<CMFieldElement<C>>getField()inthashCode()booleanisOne()booleanisZero()CMFieldElement<C>multiply(int n)CMFieldElement<C>multiply(CMFieldElement<C> other)CMFieldElement<C>negate()CMFieldElement<C>reciprocal()CMFieldElement<C>subtract(CMFieldElement<C> other)java.lang.StringtoString()Get the string representation.
-
-
-
Constructor Detail
-
CMFieldElement
public CMFieldElement(C v)
-
-
Method Detail
-
add
public CMFieldElement<C> add(CMFieldElement<C> other)
-
negate
public CMFieldElement<C> negate()
-
compareTo
public int compareTo(CMFieldElement<C> other)
-
divide
public CMFieldElement<C> divide(CMFieldElement<C> other) throws java.lang.ArithmeticException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getField
public org.apache.commons.math3.Field<CMFieldElement<C>> getField()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
multiply
public CMFieldElement<C> multiply(CMFieldElement<C> other)
-
multiply
public CMFieldElement<C> multiply(int n)
-
subtract
public CMFieldElement<C> subtract(CMFieldElement<C> other)
-
reciprocal
public CMFieldElement<C> reciprocal()
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
isOne
public boolean isOne()
-
isZero
public boolean isZero()
-
-