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) int
int
getPrime()
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, zero
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.AdditiveGroup
doubling, isZero, negate, scale, scale, subtract, sum
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.CommutativeMonoid
add, add, add, zero
Methods inherited from interface dk.jonaslindstrom.ruffini.common.abstractions.Monoid
identity, isIdentity, power
Methods 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:Group
Return the inverse a-1.- Specified by:
invert
in interfaceGroup<Polynomial<Integer>>
-
toString
- Overrides:
toString
in classQuotientRing<Polynomial<Integer>>
-
getPrime
public int getPrime() -
getExponent
public int getExponent() -
createElement
-