|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jas.arith.ModLongRing
public final class ModLongRing
ModLongRing factory with RingFactory interface. Effectively immutable.
| Field Summary | |
|---|---|
protected int |
certainty
Certainty if module is probable prime. |
protected int |
isField
Indicator if this ring is a field. |
static java.math.BigInteger |
MAX_LONG
maximal representable integer. |
long |
modul
Module part of the factory data structure. |
| Constructor Summary | |
|---|---|
ModLongRing(java.math.BigInteger m)
The constructor creates a ModLongRing object from a BigInteger converted to long as module part. |
|
ModLongRing(java.math.BigInteger m,
boolean isField)
The constructor creates a ModLongRing object from a BigInteger converted to long as module part. |
|
ModLongRing(long m)
The constructor creates a ModLongRing object from a long integer as module part. |
|
ModLongRing(java.lang.Long m)
The constructor creates a ModLongRing object from a Long integer as module part. |
|
ModLongRing(long m,
boolean isField)
The constructor creates a ModLongRing object from a long integer as module part. |
|
ModLongRing(java.lang.Long m,
boolean isField)
The constructor creates a ModLongRing object from a Long integer as module part. |
|
ModLongRing(java.lang.String m)
The constructor creates a ModLongRing object from a String object as module part. |
|
ModLongRing(java.lang.String m,
boolean isField)
The constructor creates a ModLongRing object from a String object as module part. |
|
| Method Summary | |
|---|---|
java.math.BigInteger |
characteristic()
Characteristic of this ring. |
ModLong |
chineseRemainder(ModLong c,
ModLong ci,
ModLong a)
ModLong chinese remainder algorithm. |
ModLong |
copy(ModLong c)
Copy ModLong element c. |
ModLong |
create(java.math.BigInteger c)
Create ModLong element c. |
ModLong |
create(long c)
Create ModLong element c. |
ModLong |
create(java.lang.String c)
Create ModLong element c. |
boolean |
equals(java.lang.Object b)
Comparison with any other object. |
ModLong |
fromInteger(java.math.BigInteger a)
Get a ModLong element from a BigInteger value. |
ModLong |
fromInteger(long a)
Get a ModLong element from a long value. |
java.util.List<ModLong> |
generators()
Get a list of the generating elements. |
BigInteger |
getIntegerModul()
Get the module part as BigInteger. |
long |
getLongModul()
Get the module part as long. |
java.math.BigInteger |
getModul()
Get the module part as BigInteger. |
ModLong |
getONE()
Get the one element. |
ModLong |
getZERO()
Get the zero element. |
int |
hashCode()
Hash code for this ModLongRing. |
boolean |
isAssociative()
Query if this ring is associative. |
boolean |
isCommutative()
Query if this ring is commutative. |
boolean |
isField()
Query if this ring is a field. |
boolean |
isFinite()
Is this structure finite or infinite. |
java.util.Iterator<ModLong> |
iterator()
Get a ModLong iterator. |
ModLong |
parse(java.io.Reader r)
Parse ModLong from Reader. |
ModLong |
parse(java.lang.String s)
Parse ModLong from String. |
ModLong |
random(int n)
ModLong random. |
ModLong |
random(int n,
java.util.Random rnd)
ModLong random. |
java.lang.String |
toScript()
Get a scripting compatible string representation. |
java.lang.String |
toString()
Get the String representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final long modul
protected int isField
protected int certainty
public static final java.math.BigInteger MAX_LONG
| Constructor Detail |
|---|
public ModLongRing(long m)
m - long integer.
public ModLongRing(long m,
boolean isField)
m - long integer.isField - indicator if m is prime.public ModLongRing(java.lang.Long m)
m - Long integer.
public ModLongRing(java.lang.Long m,
boolean isField)
m - Long integer.isField - indicator if m is prime.public ModLongRing(java.math.BigInteger m)
m - java.math.BigInteger.
public ModLongRing(java.math.BigInteger m,
boolean isField)
m - java.math.BigInteger.isField - indicator if m is prime.public ModLongRing(java.lang.String m)
m - String.
public ModLongRing(java.lang.String m,
boolean isField)
m - String.isField - indicator if m is prime.| Method Detail |
|---|
public java.math.BigInteger getModul()
public long getLongModul()
public BigInteger getIntegerModul()
getIntegerModul in interface ModularRingFactory<ModLong>public ModLong create(java.math.BigInteger c)
c -
public ModLong create(long c)
c -
public ModLong create(java.lang.String c)
c -
public ModLong copy(ModLong c)
copy in interface ElemFactory<ModLong>c -
public ModLong getZERO()
getZERO in interface AbelianGroupFactory<ModLong>public ModLong getONE()
getONE in interface MonoidFactory<ModLong>public java.util.List<ModLong> generators()
generators in interface ElemFactory<ModLong>ElemFactory.generators()public boolean isFinite()
isFinite in interface ElemFactory<ModLong>ElemFactory.isFinite()public boolean isCommutative()
isCommutative in interface MonoidFactory<ModLong>public boolean isAssociative()
isAssociative in interface MonoidFactory<ModLong>public boolean isField()
isField in interface RingFactory<ModLong>public java.math.BigInteger characteristic()
characteristic in interface RingFactory<ModLong>public ModLong fromInteger(java.math.BigInteger a)
fromInteger in interface ElemFactory<ModLong>a - BigInteger.
public ModLong fromInteger(long a)
fromInteger in interface ElemFactory<ModLong>a - long.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String toScript()
toScript in interface ElemFactory<ModLong>ElemFactory.toScript()public boolean equals(java.lang.Object b)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public ModLong random(int n)
random in interface ElemFactory<ModLong>n - such that 0 ≤ v ≤ (2n-1).
public ModLong random(int n,
java.util.Random rnd)
random in interface ElemFactory<ModLong>n - such that 0 ≤ v ≤ (2n-1).rnd - is a source for random bits.
public ModLong parse(java.lang.String s)
parse in interface ElemFactory<ModLong>s - String.
public ModLong parse(java.io.Reader r)
parse in interface ElemFactory<ModLong>r - Reader.
public ModLong chineseRemainder(ModLong c,
ModLong ci,
ModLong a)
chineseRemainder in interface ModularRingFactory<ModLong>c - ModLong.ci - inverse of c.modul in ring of a.a - other ModLong.
public java.util.Iterator<ModLong> iterator()
iterator in interface java.lang.Iterable<ModLong>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||