|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--com.perisic.ring.Ring
|
+--com.perisic.ring.ModularIntegerRing
The modular integer ring Z/nZ. This ring uses the BigInteger arithmetic of the java.math.* package and is therefore more efficient then a construction via the ModularRing class of this package
| Fields inherited from class com.perisic.ring.Ring |
C,
F2,
Q,
R,
Z |
| Constructor Summary | |
ModularIntegerRing(int m)
|
|
ModularIntegerRing(java.lang.Object modulus)
Construction of Z/mZ with m = modulus. |
|
| Method Summary | |
RingElt |
add(RingElt a,
RingElt b)
Returns a + b mod m. |
boolean |
equals(java.lang.Object ob)
Two ModularIntegerRing objects are equal, if the modulus is the same. |
boolean |
equalZero(RingElt b)
True if b == 0, false otherwise. |
java.math.BigInteger |
getModulus()
Returns m where this ModularIntegerRing is Z/mZ. |
RingElt |
inv(RingElt b)
Returns b^-1 mod m. |
RingElt |
map(RingElt a)
Performs the ususal map as in Ring.map(RingElt). |
RingElt |
mult(RingElt a,
RingElt b)
Returns a * b mod m. |
RingElt |
neg(RingElt b)
Returns -b mod m. |
RingElt |
one()
Returns 1. |
RingElt |
tdiv(RingElt a,
RingElt b)
The same as div(a,b). |
static java.math.BigInteger |
toBigInteger(RingElt b)
Returns the BigInteger value of b. |
RingElt |
zero()
Returns 0. |
| Methods inherited from class com.perisic.ring.Ring |
div,
ediv,
eltToString,
equal,
evaluatePolynomial,
gcd,
isEuclidian,
isField,
isUFD,
map,
map,
map,
map,
mod,
pow,
pow,
sub |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ModularIntegerRing(java.lang.Object modulus)
modulus - An instance of a BigInteger or a RingElt which can be mapped
to Ring.Z.public ModularIntegerRing(int m)
| Method Detail |
public java.math.BigInteger getModulus()
public static java.math.BigInteger toBigInteger(RingElt b)
public RingElt add(RingElt a,
RingElt b)
public RingElt mult(RingElt a,
RingElt b)
public RingElt one()
public RingElt zero()
public RingElt inv(RingElt b)
public RingElt tdiv(RingElt a,
RingElt b)
public RingElt neg(RingElt b)
public boolean equalZero(RingElt b)
public boolean equals(java.lang.Object ob)
public RingElt map(RingElt a)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||