Changeset e55bdc in git
- Timestamp:
- Jan 4, 2018, 3:39:06 PM (5 years ago)
- Branches:
- (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
- Children:
- 25ea9a7c2c1ac7855e46c5f4b2d4e82c1c271f0d
- Parents:
- cd41db8bc95c947e9ebfa6c7ca4b3c40724b3dae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/combinatorics/hilb.cc
rcd41db re55bdc 130 130 { 131 131 int l = lp, x, i, j; 132 int *p, *pl; 132 int *pl; 133 int *p; 133 134 p = pol; 134 135 for (i = Nv; i>0; i--) … … 264 265 265 266 //adds the new polynomial at the coresponding position 266 //and simplifies the ideal 267 //and simplifies the ideal, destroys p 267 268 static void SortByDeg_p(ideal I, poly p) 268 269 { … … 279 280 if(p_DivisibleBy( I->m[i],p, currRing)) 280 281 { 282 p_Delete(&p,currRing); 281 283 return; 282 284 } … … 286 288 if(p_DivisibleBy(p,I->m[i], currRing)) 287 289 { 288 I->m[i] = NULL;290 p_Delete(&I->m[i],currRing); 289 291 } 290 292 } … … 374 376 idSkipZeroes(I); 375 377 res = idInit(1,1); 376 res->m[0] = poly(0);377 378 for(i = 0; i<=IDELEMS(I)-1;i++) 378 379 { 379 380 SortByDeg_p(res, I->m[i]); 381 I->m[i]=NULL; // I->m[i] is now in res 380 382 } 381 383 idSkipZeroes(res); … … 438 440 { 439 441 SortByDeg_p(I,res->m[i]); 442 res->m[i]=NULL; // is now in I 440 443 } 441 444 } … … 449 452 { 450 453 SortByDeg_p(I,p->m[0]); 454 p->m[0]=NULL; // is now in I 451 455 //idSkipZeroes(I); 452 456 } … … 1320 1324 { 1321 1325 intvec *work, *hseries2; 1322 int i, j, k, s, t, l; 1326 int i, j, k, t, l; 1327 int s; 1323 1328 if (hseries1 == NULL) 1324 1329 return NULL; … … 1353 1358 void hDegreeSeries(intvec *s1, intvec *s2, int *co, int *mu) 1354 1359 { 1355 int m, i, j, k; 1360 int i, j, k; 1361 int m; 1356 1362 *co = *mu = 0; 1357 1363 if ((s1 == NULL) || (s2 == NULL))
Note: See TracChangeset
for help on using the changeset viewer.