Changeset 4d1104a in git
 Timestamp:
 Dec 13, 2010, 10:43:25 AM (14 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'a69e2b93742879ecc5ec70006f5f272874f94e7e')
 Children:
 37dc41c7f4b75286366de8700dfb2d28d71976d0
 Parents:
 086654227485403024df3a1e3d43b341615c040d
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/linearAlgebra.cc
r0866542 r4d1104a 1321 1321 A*x = b with constant matrix A (as decomposed above). By theory, the 1322 1322 system is guaranteed to have a unique solution. */ 1323 poly fg = ppMult_qq(f, g); /* for storing the product of f and g */ 1323 1324 for (int xExp = 1; xExp <= d; xExp++) 1324 1325 { … … 1326 1327 matrix xVec = mpNew(n + m, 1); /* x */ 1327 1328 1328 p = p pMult_qq(f,g);1329 p = pCopy(fg); 1329 1330 p = pAdd(pCopy(h), pNeg(p)); /* p = h  f*g */ 1330 1331 /* we collect all terms in p with xexponent = xExp and use their … … 1348 1349 luSolveViaLUDecomp(pMat, lMat, uMat, bVec, xVec, notUsedMat); 1349 1350 idDelete((ideal*)¬UsedMat); 1350 /* augment f and g by newly computed terms */ 1351 /* update f and g by newly computed terms, and update f*g */ 1352 poly fNew = NULL; poly gNew = NULL; 1351 1353 for (int row = 1; row <= m; row++) 1352 1354 { … … 1357 1359 pSetExp(p, yIndex, row  1); /* p = c * x^xExp * y^i */ 1358 1360 pSetm(p); 1359 g = pAdd(g, p);1361 gNew = pAdd(gNew, p); 1360 1362 } 1361 1363 } … … 1368 1370 pSetExp(p, yIndex, row  m  1); /* p = c * x^xExp * y^i */ 1369 1371 pSetm(p); 1370 f = pAdd(f, p);1372 fNew = pAdd(fNew, p); 1371 1373 } 1372 1374 } 1375 fg = pAdd(fg, ppMult_qq(f, gNew)); 1376 fg = pAdd(fg, ppMult_qq(g, fNew)); 1377 fg = pAdd(fg, ppMult_qq(fNew, gNew)); 1378 f = pAdd(f, fNew); 1379 g = pAdd(g, gNew); 1373 1380 } 1374 1381 /* cleanup loopdependent vectors */ … … 1376 1383 } 1377 1384 1378 /* cleanup matrices A, P, L and U */1385 /* cleanup matrices A, P, L and U, and polynomial fg */ 1379 1386 idDelete((ideal*)&aMat); idDelete((ideal*)&pMat); 1380 1387 idDelete((ideal*)&lMat); idDelete((ideal*)&uMat); 1381 } 1382 1388 pDelete(&fg); 1389 } 1390
Note: See TracChangeset
for help on using the changeset viewer.