Révision 169
pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage (revision 169) | ||
---|---|---|
985 | 985 |
"- pExp:", pExp, \ |
986 | 986 |
"- alpha-pExp:", alpha-pExp |
987 | 987 |
q = pRing(iVariable * iBound)^iExp * p^pExp * N^(alpha-pExp) |
988 |
print q |
|
988 |
print q.monomials()
|
|
989 | 989 |
polynomialsList.append(q) |
990 | 990 |
pExp += 1 |
991 | 991 |
return polynomialsList |
992 | 992 |
# End spo_polynomial_to_polynomials_list_7 |
993 | 993 |
|
994 |
def spo_polynomial_to_polynomials_list_8(p, alpha, N, iBound, tBound, |
|
995 |
columnsWidth=0): |
|
996 |
""" |
|
997 |
""" |
|
998 |
pRing = p.parent() |
|
999 |
polynomialsList = [] |
|
1000 |
pVariables = p.variables() |
|
1001 |
iVariable = pVariables[0] |
|
1002 |
tVariable = pVariables[1] |
|
1003 |
polynomialAtPower = copy(p) |
|
1004 |
currentPolynomial = pRing(1) # Constant term. |
|
1005 |
|
|
1006 |
for pExp in xrange(0, alpha+1): |
|
1007 |
iExp = 0 |
|
1008 |
while (iExp + pExp) <= alpha: |
|
1009 |
print "iExp:", iExp, \ |
|
1010 |
"- pExp:", pExp, \ |
|
1011 |
"- alpha-pExp:", alpha-pExp |
|
1012 |
q = pRing(iVariable * iBound)^iExp * p^pExp * N^(alpha-pExp) |
|
1013 |
print q.monomials() |
|
1014 |
polynomialsList.append(q) |
|
1015 |
iExp += 1 |
|
1016 |
return polynomialsList |
|
1017 |
# End spo_polynomial_to_polynomials_list_8 |
|
1018 |
|
|
994 | 1019 |
def spo_proto_to_column_matrix(protoMatrixColumns): |
995 | 1020 |
""" |
996 | 1021 |
Create a column (each row holds the coefficients for one monomial) matrix. |
Formats disponibles : Unified diff