Révision 91 pobysoPythonSage/src/sageSLZ/sagePolynomialOperations.sage
| sagePolynomialOperations.sage (revision 91) | ||
|---|---|---|
| 165 | 165 |
pTdegree = p.degree(pVariables[1]) |
| 166 | 166 |
currentIdegree = currentPolynomial.degree(iVariable) |
| 167 | 167 |
nAtPower = N^alpha |
| 168 |
nAtAlpha = nAtPower |
|
| 168 | 169 |
# We work from p^0 * N^alpha to p^alpha * N^0 |
| 169 | 170 |
for pPower in xrange(0, alpha + 1): |
| 170 | 171 |
# pPower == 0 is a special case. We introduce all the monomials but one |
| ... | ... | |
| 185 | 186 |
pPower, |
| 186 | 187 |
alpha) |
| 187 | 188 |
currentExpression = iVariable^iPower * \ |
| 188 |
tVariable^tPower * nAtPower
|
|
| 189 |
tVariable^tPower * nAtAlpha
|
|
| 189 | 190 |
# polynomialAtPower == 1 here. Next line should be commented |
| 190 | 191 |
# out but it does not work! Some conversion problem? |
| 191 |
currentPolynomial = pRing(currentExpression) * \ |
|
| 192 |
polynomialAtPower |
|
| 192 |
currentPolynomial = pRing(currentExpression) |
|
| 193 | 193 |
pMonomials = currentPolynomial.monomials() |
| 194 | 194 |
pCoefficients = currentPolynomial.coefficients() |
| 195 | 195 |
spo_add_polynomial_coeffs_to_matrix_row(pMonomials, |
| ... | ... | |
| 250 | 250 |
tPower, |
| 251 | 251 |
0, |
| 252 | 252 |
alpha) |
| 253 |
currentExpression = i^(iPower * pIdegree) * t^tPower * nAtPower
|
|
| 253 |
currentExpression = i^(iPower * pIdegree) * t^tPower * nAtAlpha
|
|
| 254 | 254 |
currentPolynomial = pRing(currentExpression) |
| 255 | 255 |
pMonomials = currentPolynomial.monomials() |
| 256 | 256 |
pCoefficients = currentPolynomial.coefficients() |
| ... | ... | |
| 282 | 282 |
outerTpower, |
| 283 | 283 |
0, |
| 284 | 284 |
alpha) |
| 285 |
currentExpression = i^iPower * t^outerTpower * nAtPower
|
|
| 285 |
currentExpression = i^iPower * t^outerTpower * nAtAlpha
|
|
| 286 | 286 |
currentPolynomial = pRing(currentExpression) |
| 287 | 287 |
pMonomials = currentPolynomial.monomials() |
| 288 | 288 |
pCoefficients = currentPolynomial.coefficients() |
| ... | ... | |
| 313 | 313 |
0, |
| 314 | 314 |
alpha) |
| 315 | 315 |
currentExpression = \ |
| 316 |
i^(iPower) * t^(innerTpower) * nAtPower
|
|
| 316 |
i^(iPower) * t^(innerTpower) * nAtAlpha
|
|
| 317 | 317 |
currentPolynomial = pRing(currentExpression) |
| 318 | 318 |
pMonomials = currentPolynomial.monomials() |
| 319 | 319 |
pCoefficients = currentPolynomial.coefficients() |
| ... | ... | |
| 393 | 393 |
""" |
| 394 | 394 |
Create a row (each column holds the evaluation one monomial at boundVar1 and |
| 395 | 395 |
boundVar2 values) matrix. |
| 396 |
protoMatrixRows. |
|
| 397 | 396 |
|
| 398 | 397 |
Parameters |
| 399 | 398 |
---------- |
| ... | ... | |
| 402 | 401 |
numRows = len(protoMatrixRows) |
| 403 | 402 |
if numRows == 0: |
| 404 | 403 |
return None |
| 404 |
# The last row is the longest one. |
|
| 405 | 405 |
numColumns = len(protoMatrixRows[numRows-1]) |
| 406 | 406 |
if numColumns == 0: |
| 407 | 407 |
return None |
Formats disponibles : Unified diff