Package edu.jas.poly
Class PolynomialList<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.PolynomialList<C>
- All Implemented Interfaces:
Serializable
,Comparable<PolynomialList<C>>
- Direct Known Subclasses:
OptimizedPolynomialList
,OrderedPolynomialList
public class PolynomialList<C extends RingElem<C>>
extends Object
implements Comparable<PolynomialList<C>>, Serializable
List of polynomials. Mainly for storage and printing / toString and
conversions to other representations.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List
<GenPolynomial<C>> The data structure is a List of polynomials.private static final org.apache.logging.log4j.Logger
final GenPolynomialRing
<C> The factory for the solvable polynomial ring. -
Constructor Summary
ConstructorsConstructorDescriptionPolynomialList
(GenPolynomialRing<C> r, List<GenPolynomial<C>> l) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends RingElem<C>>
List<GenPolynomial<C>> castToList
(List<? extends GenPolynomial<C>> slist) Get list of extensions of polynomials as List of GenPolynomials.static <C extends RingElem<C>>
List<List<GenPolynomial<C>>> castToMatrix
(List<List<? extends GenPolynomial<C>>> slist) Get list of list of extensions of polynomials as List of List of GenPolynomials.Get list as List of GenSolvablePolynomials.static <C extends RingElem<C>>
List<GenSolvablePolynomial<C>> castToSolvableList
(List<GenPolynomial<C>> list) Get list as List of GenSolvablePolynomials.static <C extends RingElem<C>>
List<List<GenSolvablePolynomial<C>>> castToSolvableMatrix
(List<List<GenPolynomial<C>>> list) Get list of list as List of List of GenSolvablePolynomials.int
compareTo
(PolynomialList<C> L) Polynomial list comparison.copy()
Copy this.Dehomogenize.Union of the delta of exponent vectors of all polynomials.deltaExpVectors
(List<ExpVector> mark) Union of the delta of exponent vectors of all polynomials.boolean
Comparison with any other object.getList()
Get list.getModuleList
(int i) Get ModuleList from PolynomialList.Get list as List of GenSolvablePolynomials.Get ring as GenSolvablePolynomialRing.int
hashCode()
Hash code for this polynomial list.Make homogeneous.boolean
isEmpty()
Test if list is empty.boolean
Test if all polynomials are homogeneous.boolean
isONE()
Test if list contains a ONE.boolean
isZERO()
Test if list contains only ZEROs.Leading weight polynomials.toScript()
Get a scripting compatible string representation.toString()
String representation of the polynomial list.
-
Field Details
-
ring
The factory for the solvable polynomial ring. -
list
The data structure is a List of polynomials. -
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
PolynomialList
Constructor.- Parameters:
r
- polynomial ring factory.l
- list of polynomials.
-
PolynomialList
Constructor.- Parameters:
r
- solvable polynomial ring factory.l
- list of solvable polynomials.
-
-
Method Details
-
copy
Copy this.- Returns:
- a copy of this.
-
equals
Comparison with any other object. -
compareTo
Polynomial list comparison.- Specified by:
compareTo
in interfaceComparable<C extends RingElem<C>>
- Parameters:
L
- other PolynomialList.- Returns:
- lexicographical comparison, sign of first different polynomials.
-
hashCode
public int hashCode()Hash code for this polynomial list. -
isEmpty
public boolean isEmpty()Test if list is empty.- Returns:
- true if this is empty, else false.
-
toString
String representation of the polynomial list. -
toScript
Get a scripting compatible string representation.- Returns:
- script compatible representation for this polynomial list.
-
getModuleList
Get ModuleList from PolynomialList. Extract module from polynomial ring.- Parameters:
i
- number of variables to be contract form the polynomials.- Returns:
- module list corresponding to this.
- See Also:
-
getList
Get list.- Returns:
- list from this.
-
castToSolvableList
Get list as List of GenSolvablePolynomials. Required because no List casts allowed. Equivalent to cast (List<GenSolvablePolynomial<C>>) list.- Returns:
- solvable polynomial list from this.
-
getSolvableList
Get list as List of GenSolvablePolynomials. Required because no List casts allowed. Equivalent to cast (List<GenSolvablePolynomial<C>>) list.- Returns:
- solvable polynomial list from this.
-
getSolvableRing
Get ring as GenSolvablePolynomialRing.- Returns:
- solvable polynomial ring list from this.
-
castToSolvableList
public static <C extends RingElem<C>> List<GenSolvablePolynomial<C>> castToSolvableList(List<GenPolynomial<C>> list) Get list as List of GenSolvablePolynomials. Required because no List casts allowed. Equivalent to cast (List<GenSolvablePolynomial<C>>) list.- Parameters:
list
- list of extensions of polynomials.- Returns:
- solvable polynomial list from this.
-
castToSolvableMatrix
public static <C extends RingElem<C>> List<List<GenSolvablePolynomial<C>>> castToSolvableMatrix(List<List<GenPolynomial<C>>> list) Get list of list as List of List of GenSolvablePolynomials. Required because no List casts allowed. Equivalent to cast (List<GenSolvablePolynomial<C>>) list.- Parameters:
list
- list of extensions of polynomials.- Returns:
- solvable polynomial list from this.
-
castToList
public static <C extends RingElem<C>> List<GenPolynomial<C>> castToList(List<? extends GenPolynomial<C>> slist) Get list of extensions of polynomials as List of GenPolynomials. Required because no List casts allowed. Equivalent to cast (List<GenPolynomial<C>>) list. Mainly used for lists of GenSolvablePolynomials.- Parameters:
slist
- list of extensions of polynomials.- Returns:
- polynomial list from slist.
-
castToMatrix
public static <C extends RingElem<C>> List<List<GenPolynomial<C>>> castToMatrix(List<List<? extends GenPolynomial<C>>> slist) Get list of list of extensions of polynomials as List of List of GenPolynomials. Required because no List casts allowed. Equivalent to cast (List<GenPolynomial<C>>) list. Mainly used for lists of GenSolvablePolynomials.- Parameters:
slist
- list of extensions of polynomials.- Returns:
- polynomial list from slist.
-
isZERO
public boolean isZERO()Test if list contains only ZEROs.- Returns:
- true, if this is the 0 list, else false
-
isONE
public boolean isONE()Test if list contains a ONE.- Returns:
- true, if this contains 1, else false
-
homogenize
Make homogeneous.- Returns:
- polynomial list of homogeneous polynomials.
-
deHomogenize
Dehomogenize.- Returns:
- polynomial list of de-homogenized polynomials.
-
isHomogeneous
public boolean isHomogeneous()Test if all polynomials are homogeneous.- Returns:
- true, if all polynomials are homogeneous, else false
-
deltaExpVectors
Union of the delta of exponent vectors of all polynomials.- Returns:
- list of u-v, where u = lt() and v != u in p in list.
-
deltaExpVectors
Union of the delta of exponent vectors of all polynomials.- Parameters:
mark
- list of marked exp vectors of polynomials.- Returns:
- list of u-v, where u in mark and v != u in p.expVectors in list.
-
leadingWeightPolynomials
Leading weight polynomials.- Returns:
- list of polynomials with terms of maximal weight degree.
-