|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.arith.ModInteger
public final class ModInteger
ModInteger class with RingElem interface and with the familiar SAC method names. Objects of this class are immutable.
BigInteger
,
Serialized FormField Summary | |
---|---|
ModIntegerRing |
ring
ModIntegerRing reference. |
protected java.math.BigInteger |
val
Value part of the element data structure. |
Constructor Summary | |
---|---|
ModInteger(ModIntegerRing m)
The constructor creates a 0 ModInteger object from a BigInteger object module. |
|
ModInteger(ModIntegerRing m,
java.math.BigInteger a)
The constructor creates a ModInteger object from two BigInteger objects module and value part. |
|
ModInteger(ModIntegerRing m,
long a)
The constructor creates a ModInteger object from two longs objects module and value part. |
|
ModInteger(ModIntegerRing m,
java.lang.String s)
The constructor creates a ModInteger object from two String objects module and value part. |
Method Summary | |
---|---|
ModInteger |
abs()
ModInteger absolute value. |
ModInteger |
clone()
Clone this. |
int |
compareTo(ModInteger b)
ModInteger comparison. |
ModInteger |
divide(ModInteger S)
ModInteger divide. |
ModInteger[] |
egcd(ModInteger S)
ModInteger extended greatest common divisor. |
boolean |
equals(java.lang.Object b)
Comparison with any other object. |
ModInteger |
gcd(ModInteger S)
ModInteger greatest common divisor. |
java.math.BigInteger |
getModul()
Get the module part. |
java.math.BigInteger |
getVal()
Get the value part. |
int |
hashCode()
Hash code for this ModInteger. |
ModInteger |
inverse()
ModInteger inverse. |
boolean |
isONE()
Is ModInteger number one. |
boolean |
isUnit()
Is ModInteger number a unit. |
boolean |
isZERO()
Is ModInteger number zero. |
static ModInteger |
MIABS(ModInteger A)
ModInteger absolute value. |
static int |
MICOMP(ModInteger A,
ModInteger B)
ModInteger comparison. |
static ModInteger |
MIDIF(ModInteger A,
ModInteger B)
ModInteger subtraction. |
static ModInteger |
MIINV(ModInteger A)
ModInteger inverse. |
static ModInteger |
MINEG(ModInteger A)
ModInteger negative. |
static ModInteger |
MIPROD(ModInteger A,
ModInteger B)
ModInteger product. |
static ModInteger |
MIQ(ModInteger A,
ModInteger B)
ModInteger quotient. |
static ModInteger |
MIREM(ModInteger A,
ModInteger B)
ModInteger remainder. |
static int |
MISIGN(ModInteger A)
ModInteger signum. |
static ModInteger |
MISUM(ModInteger A,
ModInteger B)
ModInteger summation. |
ModInteger |
multiply(ModInteger S)
ModInteger multiply. |
ModInteger |
negate()
ModInteger negative. |
ModInteger |
remainder(ModInteger S)
ModInteger remainder. |
int |
signum()
ModInteger signum. |
ModInteger |
subtract(ModInteger S)
ModInteger subtraction. |
ModInteger |
sum(ModInteger S)
ModInteger summation. |
java.lang.String |
toString()
Get the String representation. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final ModIntegerRing ring
protected final java.math.BigInteger val
Constructor Detail |
---|
public ModInteger(ModIntegerRing m, java.math.BigInteger a)
m
- ModIntegerRing.a
- math.BigInteger.public ModInteger(ModIntegerRing m, long a)
m
- ModIntegerRing.a
- long.public ModInteger(ModIntegerRing m, java.lang.String s)
m
- ModIntegerRing.s
- String.public ModInteger(ModIntegerRing m)
m
- ModIntegerRing.Method Detail |
---|
public java.math.BigInteger getVal()
public java.math.BigInteger getModul()
public ModInteger clone()
clone
in interface Element<ModInteger>
clone
in class java.lang.Object
Object.clone()
public boolean isZERO()
isZERO
in interface AbelianGroupElem<ModInteger>
AbelianGroupElem.isZERO()
public boolean isONE()
isONE
in interface MonoidElem<ModInteger>
MonoidElem.isONE()
public boolean isUnit()
isUnit
in interface MonoidElem<ModInteger>
MonoidElem.isUnit()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int compareTo(ModInteger b)
compareTo
in interface Element<ModInteger>
compareTo
in interface java.lang.Comparable<ModInteger>
b
- ModInteger.
public static int MICOMP(ModInteger A, ModInteger B)
A
- ModInteger.B
- ModInteger.
public boolean equals(java.lang.Object b)
equals
in interface Element<ModInteger>
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in interface Element<ModInteger>
hashCode
in class java.lang.Object
Object.hashCode()
public ModInteger abs()
abs
in interface AbelianGroupElem<ModInteger>
AbelianGroupElem.abs()
public static ModInteger MIABS(ModInteger A)
A
- ModInteger.
public ModInteger negate()
negate
in interface AbelianGroupElem<ModInteger>
AbelianGroupElem.negate()
public static ModInteger MINEG(ModInteger A)
A
- ModInteger.
public int signum()
signum
in interface AbelianGroupElem<ModInteger>
AbelianGroupElem.signum()
public static int MISIGN(ModInteger A)
A
- ModInteger
public ModInteger subtract(ModInteger S)
subtract
in interface AbelianGroupElem<ModInteger>
S
- ModInteger.
public static ModInteger MIDIF(ModInteger A, ModInteger B)
A
- ModInteger.B
- ModInteger.
public ModInteger divide(ModInteger S)
divide
in interface MonoidElem<ModInteger>
S
- ModInteger.
public static ModInteger MIQ(ModInteger A, ModInteger B)
A
- ModInteger.B
- ModInteger.
public ModInteger inverse()
inverse
in interface MonoidElem<ModInteger>
NotInvertibleException
- if the element is not invertible.MonoidElem.inverse()
public static ModInteger MIINV(ModInteger A)
MonoidElem.inverse()
A
- is a non-zero integer.
public ModInteger remainder(ModInteger S)
remainder
in interface MonoidElem<ModInteger>
S
- ModInteger.
public static ModInteger MIREM(ModInteger A, ModInteger B)
A
- ModInteger.B
- ModInteger.
public ModInteger multiply(ModInteger S)
multiply
in interface MonoidElem<ModInteger>
S
- ModInteger.
public static ModInteger MIPROD(ModInteger A, ModInteger B)
A
- ModInteger.B
- ModInteger.
public ModInteger sum(ModInteger S)
sum
in interface AbelianGroupElem<ModInteger>
S
- ModInteger.
public static ModInteger MISUM(ModInteger A, ModInteger B)
A
- ModInteger.B
- ModInteger.
public ModInteger gcd(ModInteger S)
gcd
in interface RingElem<ModInteger>
S
- ModInteger.
public ModInteger[] egcd(ModInteger S)
egcd
in interface RingElem<ModInteger>
S
- ModInteger.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |