public class Zn extends Group implements FieldI, OrderedSetI, HasModI, HasPowerI
* | 1 2 3 4 ------------ 1 | 1 2 3 4 2 | 2 4 1 3 3 | 3 1 4 2 4 | 4 3 2 1
/ | 1 2 3 4 ------------ 1 | 1 2 3 4 2 | 3 1 4 2 3 | 2 4 1 3 4 | 4 3 2 1
Constructor and Description |
---|
Zn(BigInteger modulus) |
Modifier and Type | Method and Description |
---|---|
Number |
add(Number num1,
Number num2)
Get sum of the numbers
|
int |
compare(Number a,
Number b)
Returns -1,0,1 depending on whether a is less than, equal to or greater than b.
|
Number |
div(Number num1,
Number num2)
get division of two numbers.
|
boolean |
equals(Number a,
Number b)
whether two numbers are equal
|
Number |
getInverse(Number num)
Get Inverse of a number
|
Number |
getMulInverse(Number num)
get mul inverse
|
Number |
getONE()
Get multiplicative identity i.e.
|
Number |
getZERO()
Returns the identity element under +
|
Number |
mod(Number num1,
Number num2) |
Number |
mul(Number num1,
Number num2)
Returns the product of two numbers, a*b
|
Number |
pow(Number num1,
Number num2) |
Number |
sub(Number num1,
Number num2)
Get the difference of the numbers.
|
String |
toString() |
Number |
valueOf(String str)
returns number given by the string
|
addStandardConstants, addStandardFunctions, getNumberFactory, isConstantPoly
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStandardConstants, addStandardFunctions, getNumberFactory, isConstantPoly
public Zn(BigInteger modulus)
public Number getZERO()
GroupI
public Number getONE()
RingI
public Number getInverse(Number num)
GroupI
getInverse
in interface GroupI
public Number getMulInverse(Number num)
FieldI
getMulInverse
in interface FieldI
public Number add(Number num1, Number num2)
GroupI
public Number sub(Number num1, Number num2)
GroupI
public Number mul(Number num1, Number num2)
RingI
public Number div(Number num1, Number num2)
HasDivI
public boolean equals(Number a, Number b)
GroupI
public int compare(Number a, Number b)
OrderedSetI
compare
in interface OrderedSetI
public Number valueOf(String str)
GroupI
Jas4pp 1.5 © Java Analysis Studio for Particle Physics