com.perisic.ring
Class FinitePrimeField
java.lang.Object
com.perisic.ring.Ring
com.perisic.ring.ModularIntegerRing
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.
- Last Change: 13.12.2003: GPL, MC.
-
Copyright:(c) Marc Conrad, 2002, 2003
-
Email: ring@perisic.com.
Please let me know if you use this software.
-
WWW: www.ring.perisic.com
- The com.perisic.ring library is distributed under the terms of the
GNU Lesser General Public License (LGPL).
- If you require the package under a different licence please contact me.
- disclaimer: The classes are provided "as is".
There is no warranty implied by using the com.perisic.ring package.
- Version:
- 0.2
- Author:
- Marc Conrad
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 |
FinitePrimeField
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 IntegerRing.Z.map() method).
Note: The primality of modulus is not checked!
FinitePrimeField
public FinitePrimeField(int m)
- Generates a finite prime field of characteristic m.
Note: The primality of m is not checked!
isField
public boolean isField()
- returns true. This is in fact the only difference to the
ModularRing class.
- Overrides:
isField
in class Ring