Class FinitePrimeField

  extended by com.perisic.ring.Ring
      extended by com.perisic.ring.ModularIntegerRing
          extended by com.perisic.ring.FinitePrimeField

public class FinitePrimeField
extends ModularIntegerRing

Title: FinitePrimeField

Description: This class represents a finite prime field. In fact it is not checked if the modulus is a prime, so it is the responsibility of the user to ensure this.

Using a non prime as modulus can lead to an ArithmeticException in the BigInteger.gcd() method.

Marc Conrad

Field Summary
Fields inherited from class com.perisic.ring.Ring
C, F2, Q, R, Z
Constructor Summary
FinitePrimeField(int m)
          Generates a finite prime field of characteristic m.
FinitePrimeField(java.lang.Object modulus)
          Generates a finite prime field of characteristic modulus.
Method Summary
 boolean isField()
          returns true.
Methods inherited from class com.perisic.ring.ModularIntegerRing
add, equals, equalZero, getModulus, inv, map, mult, neg, one, tdiv, toBigInteger, zero
Methods inherited from class com.perisic.ring.Ring
div, ediv, eltToString, equal, evaluatePolynomial, gcd, isEuclidian, isUFD, map, map, map, map, mod, pow, pow, sub
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FinitePrimeField(java.lang.Object modulus)
Generates a finite prime field of characteristic modulus. The argument can be any Object which can be maped into an IntegerRingElt (via the method). Note: The primality of modulus is not checked!


public FinitePrimeField(int m)
Generates a finite prime field of characteristic m. Note: The primality of m is not checked!

Method Detail


public boolean isField()
returns true. This is in fact the only difference to the ModularRing class.

isField in class Ring