|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.arith.ModLong
public final class ModLong
ModLong class with RingElem interface. Objects of this class are immutable.
ModInteger
,
Serialized FormField Summary | |
---|---|
ModLongRing |
ring
ModLongRing reference. |
protected long |
val
Value part of the element data structure. |
Constructor Summary | |
---|---|
ModLong(ModLongRing m)
The constructor creates a 0 ModLong object from a given ModLongRing. |
|
ModLong(ModLongRing m,
java.math.BigInteger a)
The constructor creates a ModLong object from a ModLongRing and a value part. |
|
ModLong(ModLongRing m,
long a)
The constructor creates a ModLong object from a ModLongRing and a long value part. |
|
ModLong(ModLongRing m,
java.lang.Long a)
The constructor creates a ModLong object from a ModLongRing and a Long value part. |
|
ModLong(ModLongRing m,
java.lang.String s)
The constructor creates a ModLong object from a ModLongRing and a String value part. |
Method Summary | |
---|---|
ModLong |
abs()
ModLong absolute value. |
ModLong |
clone()
Clone this. |
int |
compareTo(ModLong b)
ModLong comparison. |
ModLong |
divide(ModLong S)
ModLong divide. |
ModLong[] |
egcd(ModLong S)
ModInteger extended greatest common divisor. |
boolean |
equals(java.lang.Object b)
Comparison with any other object. |
ModLongRing |
factory()
Get the corresponding element factory. |
long |
gcd(long T,
long S)
Long greatest common divisor. |
ModLong |
gcd(ModLong S)
ModInteger greatest common divisor. |
BigInteger |
getInteger()
Return a BigInteger from this Element. |
long |
getModul()
Get the module part. |
BigInteger |
getSymmetricInteger()
Return a symmetric BigInteger from this Element. |
long |
getSymmetricVal()
Get the symmetric value part. |
long |
getVal()
Get the value part. |
int |
hashCode()
Hash code for this ModLong. |
long[] |
hegcd(long T,
long S)
Long half extended greatest common divisor. |
ModLong |
inverse()
ModLong inverse. |
boolean |
isONE()
Is ModLong number one. |
boolean |
isUnit()
Is ModLong number a unit. |
boolean |
isZERO()
Is ModLong number zero. |
long |
modInverse(long T,
long m)
Long modular inverse. |
ModLong |
multiply(ModLong S)
ModLong multiply. |
ModLong |
negate()
ModLong negative. |
ModLong |
remainder(ModLong S)
ModLong remainder. |
int |
signum()
ModLong signum. |
ModLong |
subtract(ModLong S)
ModLong subtraction. |
ModLong |
sum(ModLong S)
ModLong summation. |
java.lang.String |
toScript()
Get a scripting compatible string representation. |
java.lang.String |
toScriptFactory()
Get a scripting compatible string representation of the factory. |
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 ModLongRing ring
protected final long val
Constructor Detail |
---|
public ModLong(ModLongRing m, java.math.BigInteger a)
m
- ModLongRing.a
- math.BigInteger.public ModLong(ModLongRing m, long a)
m
- ModLongRing.a
- long.public ModLong(ModLongRing m, java.lang.Long a)
m
- ModLongRing.a
- Long.public ModLong(ModLongRing m, java.lang.String s)
m
- ModLongRing.s
- String.public ModLong(ModLongRing m)
m
- ModLongRing.Method Detail |
---|
public long getVal()
public long getModul()
public ModLongRing factory()
factory
in interface Element<ModLong>
Element.factory()
public long getSymmetricVal()
public BigInteger getInteger()
getInteger
in interface Modular
public BigInteger getSymmetricInteger()
getSymmetricInteger
in interface Modular
public ModLong clone()
clone
in class java.lang.Object
Object.clone()
public boolean isZERO()
isZERO
in interface AbelianGroupElem<ModLong>
AbelianGroupElem.isZERO()
public boolean isONE()
isONE
in interface MonoidElem<ModLong>
MonoidElem.isONE()
public boolean isUnit()
isUnit
in interface MonoidElem<ModLong>
MonoidElem.isUnit()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
toScript
in interface Element<ModLong>
Element.toScript()
public java.lang.String toScriptFactory()
toScriptFactory
in interface Element<ModLong>
Element.toScriptFactory()
public int compareTo(ModLong b)
compareTo
in interface Element<ModLong>
compareTo
in interface java.lang.Comparable<ModLong>
b
- ModLong.
public boolean equals(java.lang.Object b)
equals
in interface Element<ModLong>
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in interface Element<ModLong>
hashCode
in class java.lang.Object
Object.hashCode()
public ModLong abs()
abs
in interface AbelianGroupElem<ModLong>
AbelianGroupElem.abs()
public ModLong negate()
negate
in interface AbelianGroupElem<ModLong>
AbelianGroupElem.negate()
public int signum()
signum
in interface AbelianGroupElem<ModLong>
AbelianGroupElem.signum()
public ModLong subtract(ModLong S)
subtract
in interface AbelianGroupElem<ModLong>
S
- ModLong.
public ModLong divide(ModLong S)
divide
in interface MonoidElem<ModLong>
S
- ModLong.
public ModLong inverse()
inverse
in interface MonoidElem<ModLong>
NotInvertibleException
- if the element is not invertible.MonoidElem.inverse()
public ModLong remainder(ModLong S)
remainder
in interface MonoidElem<ModLong>
S
- ModLong.
public ModLong multiply(ModLong S)
multiply
in interface MonoidElem<ModLong>
S
- ModLong.
public ModLong sum(ModLong S)
sum
in interface AbelianGroupElem<ModLong>
S
- ModLong.
public ModLong gcd(ModLong S)
gcd
in interface RingElem<ModLong>
S
- ModInteger.
public ModLong[] egcd(ModLong S)
egcd
in interface RingElem<ModLong>
S
- ModInteger.
public long gcd(long T, long S)
T
- long.S
- long.
public long[] hegcd(long T, long S)
T
- long.S
- long.
public long modInverse(long T, long m)
T
- long.m
- long.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |