public interface FieldElement extends RingElement
| Modifier and Type | Method and Description |
|---|---|
FieldElement |
add(Element e)
Computes \(\text{this} + e\).
|
default FieldElement |
applyFrobenius()
Computes this^characteristic.
|
default FieldElement |
applyFrobenius(int numberOfApplications)
Computes this^(characteristic^numberOfApplications)
|
default FieldElement |
div(Element e)
Computes \(\text{this} / e = \text{this} \cdot e^{-1}\).
|
default boolean |
divides(RingElement e)
Returns true iff there exists an \(x\) in the ring such that \(\text{this} \cdot x = e\).
|
default RingElement[] |
divideWithRemainder(RingElement e)
Divides this by e with remainder, returning both quotient and remainder.
|
default java.math.BigInteger |
getRank()
Implements the euclidean function of a euclidean domain.
|
Field |
getStructure()
Returns the
Structure that this Element belongs to. |
FieldElement |
inv()
Computes the multiplicative inverse of this element.
|
default FieldElement |
mul(java.math.BigInteger k)
Computes \(\text{this} \cdot k\) (equivalent to \(\text{this} + \text{this} + \cdots\) k-times).
|
FieldElement |
mul(Element e)
Computes \(\text{this} \cdot e\).
|
default FieldElement |
mul(long k)
Computes \(\text{this} \cdot k\) (equivalent to \(\text{this} + \text{this} + \cdots\) k-times).
|
FieldElement |
neg()
Computes the additive inverse of this element.
|
default FieldElement |
pow(java.math.BigInteger k)
Calculates \(\text{this}^k\).
|
default FieldElement |
pow(long k)
Calculates \(\text{this}^k\).
|
default FieldElement |
square()
Computes \(\text{this}^2\).
|
default FieldElement |
sub(Element e)
Computes \(\text{this} - e\).
|
asInteger, isOne, isUnit, isZero, toAdditiveGroupElement, toUnitGroupElementgetRepresentationgetUniqueByteRepresentation, updateAccumulatorFieldElement add(Element e)
RingElementadd in interface RingElemente - the addendFieldElement neg()
RingElementneg in interface RingElementdefault FieldElement sub(Element e)
RingElementsub in interface RingElemente - the subtrahendFieldElement mul(Element e)
RingElementmul in interface RingElemente - the factordefault FieldElement mul(java.math.BigInteger k)
RingElementmul in interface RingElementk - the factordefault FieldElement mul(long k)
RingElementmul in interface RingElementk - the factordefault FieldElement pow(java.math.BigInteger k)
RingElementNote that \(a^0 = 1\) for any \(a\) in the ring, particularly \(0^0 = 1\).
pow in interface RingElementdefault FieldElement pow(long k)
RingElementNote that \(a^0 = 1\) for any \(a\) in the ring, particularly \(0^0 = 1\).
pow in interface RingElementFieldElement inv() throws java.lang.UnsupportedOperationException
RingElementinv in interface RingElementjava.lang.UnsupportedOperationException - if this is not a unitdefault FieldElement div(Element e) throws java.lang.IllegalArgumentException
RingElementdiv in interface RingElemente - the divisorjava.lang.IllegalArgumentException - if e is not a unitdefault FieldElement square()
RingElementUseful if the ring allows squaring to be more efficiently implemented than general exponentiation.
square in interface RingElementField getStructure()
ElementStructure that this Element belongs to.getStructure in interface ElementgetStructure in interface RingElementdefault boolean divides(RingElement e) throws java.lang.UnsupportedOperationException
RingElementdivides in interface RingElementjava.lang.UnsupportedOperationException - if this cannot be decided (efficiently)default RingElement[] divideWithRemainder(RingElement e) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException
RingElement
Specifically, returns an array result such that the first entry contains the quotient
and the second entry the remainder.
Furthermore, result[1].getRank() < e.getRank() or result[1] = 0.
This definition implies that the remainder is zero if and only if e divides this element.
divideWithRemainder in interface RingElementjava.lang.UnsupportedOperationException - if the ring is not a euclidean domainjava.lang.IllegalArgumentException - if e is zerodefault java.math.BigInteger getRank()
throws java.lang.UnsupportedOperationException
RingElementThe euclidean function is a function from \(R \setminus \{0\}\) to \(\mathbb{N}_0\) such that
a.getRank() >= 0 for any a in the ring
a.mul(b).getRank() >= a.getRank() for any a, b != 0
divideWithRemainder is less than the divisor's rank
The rank of the zero element is undefined (no guarantee as to what this method returns in that case).
getRank in interface RingElementjava.lang.UnsupportedOperationException - if the ring is not a euclidean domaindefault FieldElement applyFrobenius()
default FieldElement applyFrobenius(int numberOfApplications)