Package edu.jas.poly

Class ModuleList<C extends RingElem<C>>

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    OptimizedModuleList, 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 Detail

      • 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.
    • 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()
      • isEmpty

        public boolean isEmpty()
        Test if list is empty.
        Returns:
        true if this is empty, else false.
      • isZERO

        public boolean isZERO()
        Test all elements are zero.
        Returns:
        true if all elements are zero, else false.
      • 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 columns.
      • getPolynomialList

        public PolynomialList<CgetPolynomialList​(boolean top)
        Get PolynomialList. Embed module in a polynomial ring.
        Parameters:
        top - true for TOP term order, false for POT term order.
        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.