edu.jas.poly
Class ModuleList<C extends RingElem<C>>

java.lang.Object
  extended by edu.jas.poly.ModuleList<C>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
OrderedModuleList

public class ModuleList<C extends RingElem<C>>
extends java.lang.Object
implements java.io.Serializable

List of vectors of polynomials. Mainly for storage and printing / toString and conversions to other representations.

Author:
Heinz Kredel
See Also:
Serialized Form

Field Summary
 int cols
          Number of columns in the data structure.
 java.util.List<java.util.List<GenPolynomial<C>>> list
          The data structure is a List of Lists of polynomials.
 GenPolynomialRing<C> ring
          The factory for the solvable polynomial ring.
 int rows
          Number of rows in the data structure.
 
Constructor Summary
ModuleList(GenPolynomialRing<C> r, java.util.List<java.util.List<GenPolynomial<C>>> l)
          Constructor.
ModuleList(GenSolvablePolynomialRing<C> r, java.util.List<java.util.List<GenSolvablePolynomial<C>>> l)
          Constructor.
ModuleList(GenVectorModul<GenPolynomial<C>> r, java.util.List<GenVector<GenPolynomial<C>>> l)
          Constructor.
 
Method Summary
static
<C extends RingElem<C>>
java.util.List<java.util.List<GenPolynomial<C>>>
castToList(java.util.List<java.util.List<GenSolvablePolynomial<C>>> slist)
          Get a solvable polynomials list as List of GenPolynomials.
 java.util.List<java.util.List<GenSolvablePolynomial<C>>> castToSolvableList()
          Get list as List of GenSolvablePolynomials.
 boolean equals(java.lang.Object m)
          Comparison with any other object.
 PolynomialList<C> getPolynomialList()
          Get PolynomialList.
 int hashCode()
          Hash code for this module list.
static
<C extends RingElem<C>>
java.util.List<java.util.List<GenPolynomial<C>>>
padCols(GenPolynomialRing<C> ring, java.util.List<java.util.List<GenPolynomial<C>>> l)
          Pad columns and remove zero rows.
 java.lang.String toScript()
          Get a scripting compatible string representation.
 java.lang.String toString()
          String representation of the module list.
static
<C extends RingElem<C>>
java.util.List<java.util.List<GenPolynomial<C>>>
vecToList(java.util.List<GenVector<GenPolynomial<C>>> vlist)
          Get a list of vectors as List of list of GenPolynomials.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ring

public final GenPolynomialRing<C extends RingElem<C>> ring
The factory for the solvable polynomial ring.


list

public final java.util.List<java.util.List<GenPolynomial<C extends RingElem<C>>>> list
The data structure is a List of Lists of polynomials.


rows

public final int rows
Number of rows in the data structure.


cols

public final int cols
Number of columns in the data structure.

Constructor Detail

ModuleList

public ModuleList(GenPolynomialRing<C> r,
                  java.util.List<java.util.List<GenPolynomial<C>>> l)
Constructor.

Parameters:
r - polynomial ring factory.
l - list of list of polynomials.

ModuleList

public ModuleList(GenSolvablePolynomialRing<C> r,
                  java.util.List<java.util.List<GenSolvablePolynomial<C>>> l)
Constructor.

Parameters:
r - solvable polynomial ring factory.
l - list of list of solvable polynomials.

ModuleList

public ModuleList(GenVectorModul<GenPolynomial<C>> r,
                  java.util.List<GenVector<GenPolynomial<C>>> l)
Constructor.

Parameters:
r - polynomial ring factory.
l - list of vectors of polynomials.
Method Detail

equals

public boolean equals(java.lang.Object m)
Comparison with any other object.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Hash code for this module list.

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
String representation of the module list.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

toScript

public java.lang.String toScript()
Get a scripting compatible string representation.

Returns:
script compatible representation for this ModuleList.

padCols

public static <C extends RingElem<C>> java.util.List<java.util.List<GenPolynomial<C>>> padCols(GenPolynomialRing<C> ring,
                                                                                               java.util.List<java.util.List<GenPolynomial<C>>> l)
Pad columns and remove zero rows. Make all rows have the same number of columns.

Parameters:
ring - polynomial ring factory.
l - list of list of polynomials.
Returns:
list of list of polynomials with same number of colums.

getPolynomialList

public PolynomialList<C> getPolynomialList()
Get PolynomialList. Embed module in a polynomial ring.

Returns:
polynomial list corresponding to this.
See Also:
PolynomialList

castToSolvableList

public java.util.List<java.util.List<GenSolvablePolynomial<C>>> castToSolvableList()
Get list as List of GenSolvablePolynomials. Required because no List casts allowed. Equivalent to cast (List<List<GenSolvablePolynomial<C>>>) list.

Returns:
list of solvable polynomial lists from this.

castToList

public static <C extends RingElem<C>> java.util.List<java.util.List<GenPolynomial<C>>> castToList(java.util.List<java.util.List<GenSolvablePolynomial<C>>> slist)
Get a solvable polynomials list as List of GenPolynomials. Required because no List casts allowed. Equivalent to cast (List<List<GenPolynomial<C>>>) list.

Parameters:
slist - list of solvable polynomial lists.
Returns:
list of polynomial lists from slist.

vecToList

public static <C extends RingElem<C>> java.util.List<java.util.List<GenPolynomial<C>>> vecToList(java.util.List<GenVector<GenPolynomial<C>>> vlist)
Get a list of vectors as List of list of GenPolynomials.

Parameters:
vlist - list of vectors of polynomials.
Returns:
list of polynomial lists from vlist.