Class FiniteField
java.lang.Object
dk.jonaslindstrom.ruffini.common.structures.QuotientRing<Polynomial<Integer>>
dk.jonaslindstrom.ruffini.finitefields.FiniteField
- All Implemented Interfaces:
AdditiveGroup<Polynomial<Integer>>,CommutativeMonoid<Polynomial<Integer>>,Field<Polynomial<Integer>>,Group<Polynomial<Integer>>,Monoid<Polynomial<Integer>>,Ring<Polynomial<Integer>>,Semigroup<Polynomial<Integer>>,SemiRing<Polynomial<Integer>>,Set<Polynomial<Integer>>
public class FiniteField
extends QuotientRing<Polynomial<Integer>>
implements Field<Polynomial<Integer>>
-
Field Summary
Fields inherited from class dk.jonaslindstrom.ruffini.common.structures.QuotientRing
mod, ring -
Constructor Summary
ConstructorsConstructorDescriptionFiniteField(int p, int n) Create a new finite field of order pn using default representation.FiniteField(PrimeField baseField, Polynomial<Integer> mod) Create a finite field as a field of prime order module an irreducible polynomial. -
Method Summary
Modifier and TypeMethodDescriptioncreateElement(Integer... c) intintgetPrime()invert(Polynomial<Integer> a) Return the inverse a-1.toString()Methods inherited from class dk.jonaslindstrom.ruffini.common.structures.QuotientRing
add, equals, identity, multiply, negate, toString, zeroMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, negate, scale, scale, subtract, sumMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add, add, zeroMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
identity, isIdentity, powerMethods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Semigroup
multiply, multiply, multiply
-
Constructor Details
-
FiniteField
public FiniteField(int p, int n) Create a new finite field of order pn using default representation. -
FiniteField
Create a finite field as a field of prime order module an irreducible polynomial.
-
-
Method Details
-
element
-
invert
Description copied from interface:GroupReturn the inverse a-1.- Specified by:
invertin interfaceGroup<Polynomial<Integer>>
-
toString
- Overrides:
toStringin classQuotientRing<Polynomial<Integer>>
-
getPrime
public int getPrime() -
getExponent
public int getExponent() -
createElement
-