public class ExtensionFieldElement extends java.lang.Object implements FieldElement, UniqueByteRepresentable
ExtensionField.| Constructor and Description |
|---|
ExtensionFieldElement(ExtensionField f,
FieldElement[] coefficients) |
| Modifier and Type | Method and Description |
|---|---|
ExtensionFieldElement |
add(Element e)
Computes \(\text{this} + e\).
|
ExtensionFieldElement |
applyFrobenius()
Computes this^characteristic.
|
java.math.BigInteger |
asInteger()
Interprets this element as an integer.
|
ExtensionFieldElement |
conjugate()
Computes the conjugate of this element.
|
boolean |
equals(java.lang.Object obj) |
FieldElement[] |
getCoefficients()
The coefficients of the polynomial over getStructure().getBaseField() defining this element
|
Representation |
getRepresentation()
The representation of this object.
|
ExtensionField |
getStructure()
Returns the
Structure that this Element belongs to. |
int |
hashCode() |
ExtensionFieldElement |
inv()
Computes the multiplicative inverse of this element.
|
ExtensionFieldElement |
mul(Element e)
Computes \(\text{this} \cdot e\).
|
ExtensionFieldElement |
neg()
Computes the additive inverse of this element.
|
ExtensionFieldElement |
reduce() |
java.lang.String |
toString() |
ByteAccumulator |
updateAccumulator(ByteAccumulator accumulator)
Updates the ByteAccumulator with the unique byte representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitapplyFrobenius, div, divides, divideWithRemainder, getRank, mul, mul, pow, pow, square, subisOne, isUnit, isZero, toAdditiveGroupElement, toUnitGroupElementgetUniqueByteRepresentationpublic ExtensionFieldElement(ExtensionField f, FieldElement[] coefficients)
public Representation getRepresentation()
RepresentableReprUtilgetRepresentation in interface RepresentableRepresentationpublic ExtensionFieldElement add(Element e)
RingElementadd in interface FieldElementadd in interface RingElemente - the addendpublic ExtensionFieldElement neg()
RingElementneg in interface FieldElementneg in interface RingElementpublic ExtensionFieldElement mul(Element e)
RingElementmul in interface FieldElementmul in interface RingElemente - the factorpublic FieldElement[] getCoefficients()
public ExtensionFieldElement inv() throws java.lang.UnsupportedOperationException
RingElementinv in interface FieldElementinv in interface RingElementjava.lang.UnsupportedOperationException - if this is not a unitpublic ExtensionFieldElement conjugate()
For an element x with coefficients in F_q, compute x^q.
public ExtensionFieldElement applyFrobenius()
FieldElementapplyFrobenius in interface FieldElementpublic ExtensionField getStructure()
ElementStructure that this Element belongs to.getStructure in interface ElementgetStructure in interface FieldElementgetStructure in interface RingElementpublic int hashCode()
public boolean equals(java.lang.Object obj)
public ExtensionFieldElement reduce()
public java.lang.String toString()
toString in class java.lang.Objectpublic ByteAccumulator updateAccumulator(ByteAccumulator accumulator)
UniqueByteRepresentableThe input to the accumulators update function is an injective (with respect to a given domain) byte encoding of this object.
For many use-cases, the AnnotatedUbrUtil can be used to quickly implement this method.
updateAccumulator in interface UniqueByteRepresentablepublic java.math.BigInteger asInteger()
throws java.lang.UnsupportedOperationException
RingElementResult will be between 0 and the ring's characteristic.
Formally, this method shall return the inverse of Ring.getElement(BigInteger), i.e.
x.getStructure().getElement(x.asInteger()).equals(x) (if asInteger() doesn't throw an exception).
asInteger in interface RingElementjava.lang.UnsupportedOperationException - if no such element exists or cannot be efficiently computed