Class FiniteField<E extends IUnivariatePolynomial<E>>

Type Parameters:
E - type of polynomials that represent elements of this Galois field
All Implemented Interfaces:
IParser<E>, Stringifiable<E>, IPolynomialRing<E>, Ring<E>, Serializable, Iterable<E>, Comparator<E>

public final class FiniteField<E extends IUnivariatePolynomial<E>>
extends SimpleFieldExtension<E>
Galois field GF(p, q). Galois field is represented as a quotient ring F[x]/<m(x)> with given irreducible polynomial m(x) (minimal polynomial); cardinality of then field is than p^q where p is the cardinality of F and q is the degree of minimal polynomial. Since Galois field is in fact a simple field extension it inherits all corresponding methods.
Since:
1.0
See Also:
AlgebraicNumberField, Rings.GF(IUnivariatePolynomial), Rings.GF(long, int), Serialized Form
  • Field Details

  • Constructor Details

    • FiniteField

      public FiniteField​(E minimalPoly)
      Constructs finite field from the specified irreducible polynomial.

      NOTE: irreducibility test for the minimal polynomial is not performed here, use IrreduciblePolynomials.irreducibleQ(IUnivariatePolynomial) to test irreducibility.

      Parameters:
      minimalPoly - the minimal polynomial
  • Method Details

    • isField

      public boolean isField()
      Description copied from interface: Ring
      Returns whether this ring is a field
      Returns:
      whether this ring is a field
    • isUnit

      public boolean isUnit​(E element)
      Description copied from interface: Ring
      Tests whether specified element is a ring unit
      Parameters:
      element - the ring element
      Returns:
      whether specified element is a ring unit
      See Also:
      Ring.isOne(Object)
    • gcd

      public E gcd​(E a, E b)
      Description copied from interface: Ring
      Returns the greatest common divisor of two elements
      Parameters:
      a - the first element
      b - the second element
      Returns:
      gcd
    • divideAndRemainder

      public E[] divideAndRemainder​(E a, E b)
      Description copied from interface: Ring
      Returns quotient and remainder of dividend / divider
      Parameters:
      a - the dividend
      b - the divider
      Returns:
      {quotient, remainder}
    • remainder

      public E remainder​(E dividend, E divider)
      Description copied from interface: Ring
      Returns the remainder of dividend / divider
      Parameters:
      dividend - the dividend
      divider - the divider
      Returns:
      the remainder of dividend / divider
    • iterator

      public Iterator<E> iterator()
      Returns iterator over all field elements
      Returns:
      iterator over all field elements