|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jas.arith.ProductRing<C>
public class ProductRing<C extends RingElem<C>>
Direct product ring factory based on RingElem and RingFactory module. Objects of this class are mutable.
| Field Summary | |
|---|---|
protected int |
nCopies
Ring factory is n copies. |
protected static java.util.Random |
random
A default random sequence generator. |
protected RingFactory<C> |
ring
One Ring factory. |
protected java.util.List<RingFactory<C>> |
ringList
Ring factory list. |
| Constructor Summary | |
|---|---|
ProductRing(java.util.List<RingFactory<C>> l)
The constructor creates a ProductRing object from an ring factory and a modul. |
|
ProductRing(RingFactory<C> r,
int n)
The constructor creates a ProductRing object from an ring factory and a modul. |
|
| Method Summary | |
|---|---|
void |
addFactory(RingFactory<C> rf)
Add a ring factory. |
java.math.BigInteger |
characteristic()
Characteristic of this ring. |
boolean |
containsFactory(RingFactory<C> rf)
Contains a ring factory. |
Product<C> |
copy(Product<C> c)
Copy Product element c. |
boolean |
equals(java.lang.Object b)
Comparison with any other object. |
Product<C> |
fromInteger(java.math.BigInteger a)
Get a Product element from a BigInteger value. |
Product<C> |
fromInteger(long a)
Get a Product element from a long value. |
java.util.List<Product<C>> |
generators()
Get a list of the generating elements. |
Product<C> |
getAtomic(int i)
Get an atomic element. |
RingFactory<C> |
getFactory(int i)
Get ring factory at index i. |
Product<C> |
getONE()
Get the one element. |
Product<C> |
getZERO()
Get the zero element. |
int |
hashCode()
Hash code for this product 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. |
boolean |
isFinite()
Is this structure finite or infinite. |
int |
length()
Get the number of factors of this ring. |
boolean |
onlyFields()
Query if this ring consists only of fields. |
Product<C> |
parse(java.io.Reader r)
Parse Product from Reader. |
Product<C> |
parse(java.lang.String s)
Parse Product from String. |
Product<C> |
random(int n)
Product random. |
Product<C> |
random(int n,
float q)
Product random. |
Product<C> |
random(int n,
float q,
java.util.Random rnd)
Product random. |
Product<C> |
random(int n,
java.util.Random rnd)
Product random. |
java.lang.String |
toScript()
Get a scripting compatible string representation. |
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 int nCopies
protected final RingFactory<C extends RingElem<C>> ring
protected final java.util.List<RingFactory<C extends RingElem<C>>> ringList
protected static final java.util.Random random
| Constructor Detail |
|---|
public ProductRing(RingFactory<C> r,
int n)
r - ring factory.n - number of copies.public ProductRing(java.util.List<RingFactory<C>> l)
l - list of ring factories.| Method Detail |
|---|
public RingFactory<C> getFactory(int i)
i - index.
public void addFactory(RingFactory<C> rf)
rf - new ring factory.public boolean containsFactory(RingFactory<C> rf)
rf - ring factory.
public boolean isFinite()
isFinite in interface ElemFactory<Product<C extends RingElem<C>>>ElemFactory.isFinite()public Product<C> copy(Product<C> c)
copy in interface ElemFactory<Product<C extends RingElem<C>>>c -
public Product<C> getZERO()
getZERO in interface AbelianGroupFactory<Product<C extends RingElem<C>>>public Product<C> getONE()
getONE in interface MonoidFactory<Product<C extends RingElem<C>>>public java.util.List<Product<C>> generators()
generators in interface ElemFactory<Product<C extends RingElem<C>>>ElemFactory.generators()public Product<C> getAtomic(int i)
i - index.
public int length()
public boolean isCommutative()
isCommutative in interface MonoidFactory<Product<C extends RingElem<C>>>public boolean isAssociative()
isAssociative in interface MonoidFactory<Product<C extends RingElem<C>>>public boolean isField()
isField in interface RingFactory<Product<C extends RingElem<C>>>public boolean onlyFields()
public java.math.BigInteger characteristic()
characteristic in interface RingFactory<Product<C extends RingElem<C>>>public Product<C> fromInteger(java.math.BigInteger a)
fromInteger in interface ElemFactory<Product<C extends RingElem<C>>>a - BigInteger.
public Product<C> fromInteger(long a)
fromInteger in interface ElemFactory<Product<C extends RingElem<C>>>a - long.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String toScript()
toScript in interface ElemFactory<Product<C extends RingElem<C>>>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 Product<C> random(int n)
random in interface ElemFactory<Product<C extends RingElem<C>>>n - such that 0 ≤ v ≤ (2n-1).
public Product<C> random(int n,
float q)
n - such that 0 ≤ v ≤ (2n-1).q - density of nozero entries.
public Product<C> random(int n,
java.util.Random rnd)
random in interface ElemFactory<Product<C extends RingElem<C>>>n - such that 0 ≤ v ≤ (2n-1).rnd - is a source for random bits.
public Product<C> random(int n,
float q,
java.util.Random rnd)
n - such that 0 ≤ v ≤ (2n-1).q - density of nozero entries.rnd - is a source for random bits.
public Product<C> parse(java.lang.String s)
parse in interface ElemFactory<Product<C extends RingElem<C>>>s - String.
public Product<C> parse(java.io.Reader r)
parse in interface ElemFactory<Product<C extends RingElem<C>>>r - Reader.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||