|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jas.structure.ResidueRing<C>
public class ResidueRing<C extends RingElem<C>>
Residue ring factory based on RingElem and RingFactory module. Objects of this class are immutable.
| Field Summary | |
|---|---|
protected int |
isField
Indicator if this ring is a field. |
protected C |
modul
Ring elemsnt for reduction. |
protected RingFactory<C> |
ring
Ring factory. |
| Constructor Summary | |
|---|---|
ResidueRing(RingFactory<C> r,
C m)
The constructor creates a ResidueRing object from an ring factory and a modul. |
|
| Method Summary | |
|---|---|
java.math.BigInteger |
characteristic()
Characteristic of this ring. |
Residue<C> |
copy(Residue<C> c)
Copy Residue element c. |
boolean |
equals(java.lang.Object b)
Comparison with any other object. |
Residue<C> |
fromInteger(java.math.BigInteger a)
Get a Residue element from a BigInteger value. |
Residue<C> |
fromInteger(long a)
Get a Residue element from a long value. |
Residue<C> |
getONE()
Get the one element. |
Residue<C> |
getZERO()
Get the zero element. |
int |
hashCode()
Hash code for this residue ring. |
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. |
Residue<C> |
parse(java.io.Reader r)
Parse Residue from Reader. |
Residue<C> |
parse(java.lang.String s)
Parse Residue from String. |
Residue<C> |
random(int n)
Residue random. |
Residue<C> |
random(int n,
java.util.Random rnd)
Residue random. |
java.lang.String |
toString()
Get the String representation as RingFactory. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final C extends RingElem<C> modul
protected final RingFactory<C extends RingElem<C>> ring
protected int isField
| Constructor Detail |
|---|
public ResidueRing(RingFactory<C> r,
C m)
r - ring factory.m - modul.| Method Detail |
|---|
public Residue<C> copy(Residue<C> c)
copy in interface ElemFactory<Residue<C extends RingElem<C>>>c -
public Residue<C> getZERO()
getZERO in interface AbelianGroupFactory<Residue<C extends RingElem<C>>>public Residue<C> getONE()
getONE in interface MonoidFactory<Residue<C extends RingElem<C>>>public boolean isCommutative()
isCommutative in interface MonoidFactory<Residue<C extends RingElem<C>>>public boolean isAssociative()
isAssociative in interface MonoidFactory<Residue<C extends RingElem<C>>>public boolean isField()
isField in interface RingFactory<Residue<C extends RingElem<C>>>public java.math.BigInteger characteristic()
characteristic in interface RingFactory<Residue<C extends RingElem<C>>>public Residue<C> fromInteger(java.math.BigInteger a)
fromInteger in interface ElemFactory<Residue<C extends RingElem<C>>>a - BigInteger.
public Residue<C> fromInteger(long a)
fromInteger in interface ElemFactory<Residue<C extends RingElem<C>>>a - long.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()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 Residue<C> random(int n)
random in interface ElemFactory<Residue<C extends RingElem<C>>>n - such that 0 ≤ v ≤ (2n-1).
public Residue<C> random(int n,
java.util.Random rnd)
random in interface ElemFactory<Residue<C extends RingElem<C>>>n - such that 0 ≤ v ≤ (2n-1).rnd - is a source for random bits.
public Residue<C> parse(java.lang.String s)
parse in interface ElemFactory<Residue<C extends RingElem<C>>>s - String.
public Residue<C> parse(java.io.Reader r)
parse in interface ElemFactory<Residue<C extends RingElem<C>>>r - Reader.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||