Changeset 4f006f in git for Singular/tgb.cc
 Timestamp:
 Mar 2, 2003, 9:14:04 AM (21 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 6cf1919180db9e6de9ce32ce1d9103622b929d39
 Parents:
 d6f4d943dc9e5df16732b62b38b67a0be4f90de3
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/tgb.cc
rd6f4d9 r4f006f 1265 1265 buf[i].p=h; 1266 1266 buf[i].sev=pGetShortExpVector(h); 1267 buf[i].sum=NULL; 1267 1268 buf[i].bucket = kBucketCreate(currRing); 1268 1269 kBucketInit(buf[i].bucket,buf[i].p,len); … … 1543 1544 ideal t_rep_gb(ring r,ideal arg_I){ 1544 1545 Print("Idelems %i \n\n",IDELEMS(arg_I)); 1545 ideal I_temp=idCopy(arg_I); //kInterRed(arg_I); 1546 ideal I=idCompactify(I_temp); 1546 ideal I=idCompactify(arg_I); 1547 1547 qsort(I>m,IDELEMS(I),sizeof(poly),poly_crit); 1548 idDelete(&I_temp);1549 1548 Print("Idelems %i \n\n",IDELEMS(I)); 1550 1549 calc_dat* c=(calc_dat*) omalloc(sizeof(calc_dat)); … … 1555 1554 while(c>pair_top>=0) 1556 1555 go_on(c); 1557 omfree(c>rep); 1556 1558 1557 for(int z=0;z<c>n;z++){ 1559 1558 omfree(c>states[z]); … … 1575 1574 printf("calculated %d NFs\n",c>normal_forms); 1576 1575 printf("applied %i product crit, %i extended_product crit \n", c>easy_product_crit, c>extended_product_crit); 1577 I=c>S; 1576 int deleted_form_c_s=0; 1577 1578 for(i=0;i<c>n;i++){ 1579 if (c>rep[i]!=i){ 1580 for(int j=0;j<=c>strat>sl;j++){ 1581 if(c>strat>S[j]==c>S>m[i]){ 1582 c>strat>S[j]=NULL; 1583 break; 1584 } 1585 } 1586 PrintS("R_delete"); 1587 pDelete(&c>S>m[i]); 1588 } 1589 } 1590 for(i=0;i<=c>strat>sl;i++){ 1591 if (!c>strat>S[i]) continue; 1592 BOOLEAN found=FALSE; 1593 for(int j=0;j<c>n;j++){ 1594 if (c>S>m[j]==c>strat>S[i]){ 1595 found=TRUE; 1596 break; 1597 } 1598 } 1599 if(!found) pDelete(&c>strat>S[i]); 1600 } 1601 omfree(c>rep); 1602 I=c>S; 1578 1603 IDELEMS(I)=c>n; 1604 1605 idSkipZeroes(c>S); 1606 1607 1579 1608 omfree(c); 1580 1609 … … 2317 2346 return; 2318 2347 } 2348 void red_object::flatten(){ 2349 if (sum!=NULL) 2350 { 2351 2352 2353 if(kBucketGetLm(sum>ac>bucket)!=NULL){ 2354 number mult_my=n_Mult(sum>c_my,sum>ac>multiplied,currRing); 2355 poly add_this; 2356 if(!nIsOne(mult_my)) 2357 kBucket_Mult_n(bucket,mult_my); 2358 int len; 2359 poly clear_into; 2360 kBucketClear(sum>ac>bucket,&clear_into,&len); 2361 if(sum>ac>counter>1){ 2362 add_this=pCopy(clear_into); 2363 kBucketInit(bucket,clear_into,len); 2364 } 2365 else 2366 add_this=clear_into; 2367 pMult_nn(add_this, sum>c_ac); 2368 nDelete(&sum>c_ac); 2369 nDelete(&sum>c_my); 2370 nDelete(&mult_my); 2371 delete sum; 2372 kBucket_Add_q(bucket,add_this, &len); 2373 sum>ac>decrease_counter(); 2374 2375 } 2376 } 2377 } 2378 void red_object::validate(){ 2379 if(sum!=NULL) 2380 { 2381 poly lm=kBucketGetLm(bucket); 2382 poly lm_ac=kBucketGetLm(sum>ac>bucket); 2383 if ((lm_ac==NULL)((lm!=NULL) && (pLmCmp(lm,lm_ac)!=1))){ 2384 flatten(); 2385 p=kBucketGetLm(bucket); 2386 } 2387 else 2388 { 2389 p=lm_ac; 2390 } 2391 2392 } 2393 else 2394 p=kBucketGetLm(bucket); 2395 2396 }
Note: See TracChangeset
for help on using the changeset viewer.