public interface Field extends Ring
| Modifier and Type | Method and Description |
|---|---|
FieldElement |
getElement(java.math.BigInteger i)
Maps the integer i into this ring \(R\), such that this map is a
ring homomorphism \(\mathbb{Z}_{\text{getCharacteristic()}} \rightarrow R\).
|
default FieldElement |
getElement(long i)
Maps the integer i into this ring \(R\), such that this map is a
ring homomorphism \(\mathbb{Z}_{\text{getCharacteristic()}} \rightarrow R\).
|
FieldElement |
getOneElement()
Returns the multiplicative neutral element of this ring.
|
FieldElement |
getPrimitiveElement()
If this is a finite field, returns a generator of the field's unit group.
|
FieldElement |
getUniformlyRandomElement()
Returns an element of this structure that is drawn uniformly at random
using a cryptographically strong RNG.
|
default FieldElement |
getUniformlyRandomUnit()
Generates an invertible element from this ring uniformly at random using a cryptographically strong RNG.
|
FieldElement |
getZeroElement()
Returns the additive neutral element of this ring.
|
default boolean |
isCommutative()
Returns true if this ring is known to be commutative.
|
FieldElement |
restoreElement(Representation repr)
Creates an element of this structure from its representation.
|
default java.math.BigInteger |
sizeUnitGroup()
Returns the number of units in this ring.
|
asAdditiveGroup, asUnitGroup, extendedEuclideanAlgorithm, extendedEuclideanAlgorithm, getCharacteristic, getUniformlyRandomElements, getUniformlyRandomNonzeroElement, getUniformlyRandomNonzeroElements, getUniformlyRandomUnits, restoreFromRepresentation, restoreVectorgetUniqueByteLength, hasPrimeSize, sizegetRepresentationFieldElement getPrimitiveElement() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException - if operation is not feasible or undefineddefault java.math.BigInteger sizeUnitGroup()
RingsizeUnitGroup in interface RingFieldElement getZeroElement()
RinggetZeroElement in interface RingFieldElement getOneElement()
RinggetOneElement in interface RingFieldElement restoreElement(Representation repr)
StructurerestoreElement in interface RingrestoreElement in interface Structurerepr - the Representation returned by Representable.getRepresentation()FieldElement getElement(java.math.BigInteger i)
RinggetElement in interface Ringi - the integer to mapdefault FieldElement getElement(long i)
RinggetElement in interface Ringi - the integer to mapFieldElement getUniformlyRandomElement() throws java.lang.UnsupportedOperationException
StructuregetUniformlyRandomElement in interface RinggetUniformlyRandomElement in interface Structurejava.lang.UnsupportedOperationException - if the operation is not supporteddefault FieldElement getUniformlyRandomUnit() throws java.lang.UnsupportedOperationException
RingThe default implementation generates random ring elements until it hits a unit. Implementors should override if this is not feasible or if there is a better way!
getUniformlyRandomUnit in interface Ringjava.lang.UnsupportedOperationException - if the ring does not support this methoddefault boolean isCommutative()
RingisCommutative in interface Ring