- Timestamp:
- May 27, 2016, 1:08:52 PM (8 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
- Children:
- 48cbb08675244a2938cd9318ad2f38b0c70e5172
- Parents:
- d6e0c0fd81f7fba2ec29faa8a27186e0133b2293
- Location:
- kernel/GBEngine
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kspoly.cc
rd6e0c0 r11416e 280 280 //The sigs have the same lm, have to substract 281 281 PR->sig = pSub(PR->sig, pCopy(sigMult)); 282 pDelete(&sigMult); 282 283 //It may happen that now the signature is 0 (drop) 283 284 if(PR->sig == NULL) … … 288 289 strat->sigdrop=TRUE; 289 290 } 290 } 291 else 292 { 293 if(sigSafe == -1) 291 else 294 292 { 295 // do not allow this reduction - it will increase it's signature 296 // and the partially standard basis is just till the old sig, not the new one 297 PR->is_redundant = TRUE; 298 return 3; 293 if(sigSafe == -1) 294 { 295 // do not allow this reduction - it will increase it's signature 296 // and the partially standard basis is just till the old sig, not the new one 297 PR->is_redundant = TRUE; 298 return 3; 299 } 299 300 } 300 301 } … … 302 303 #endif 303 304 //pDelete(&f1); 304 pDelete(&sigMult);305 305 // go on with the computations only if the signature of p2 is greater than the 306 306 // signature of fm*p1 -
kernel/GBEngine/kstd1.cc
rd6e0c0 r11416e 2564 2564 r=sba(F,Q,NULL,hilb,strat); 2565 2565 #if ADIDEBUG 2566 printf("\nSBA Run 1: %i elements (syzCrit = %i )\n",IDELEMS(r),strat->nrsyzcrit);2566 printf("\nSBA Run 1: %i elements (syzCrit = %i,rewCrit = %i)\n",IDELEMS(r),strat->nrsyzcrit,strat->nrrewcrit); 2567 2567 //idPrint(r); 2568 2568 //getchar(); … … 2573 2573 r=sba(r,Q,NULL,hilb,strat); 2574 2574 #if ADIDEBUG 2575 printf("SBA Run %i: %i elements (syzCrit = %i )\n",sbarun++,IDELEMS(r),strat->nrsyzcrit);2575 printf("SBA Run %i: %i elements (syzCrit = %i,rewCrit = %i)\n",sbarun++,IDELEMS(r),strat->nrsyzcrit,strat->nrrewcrit); 2576 2576 //idPrint(r); 2577 2577 //getchar(); -
kernel/GBEngine/kstd2.cc
rd6e0c0 r11416e 1656 1656 printf("\n list L\n"); 1657 1657 int iii; 1658 #if 11658 #if 0 1659 1659 for(iii = 0; iii<= strat->Ll; iii++) 1660 1660 { … … 1672 1672 } 1673 1673 #endif 1674 #if 11674 #if 0 1675 1675 for(iii = 0; iii<= strat->Bl; iii++) 1676 1676 { … … 2049 2049 strat->sigdrop = FALSE; 2050 2050 strat->nrsyzcrit = 0; 2051 strat->nrrewcrit = 0; 2051 2052 #endif 2052 2053 #if SBA_INTERRED_START … … 2165 2166 } 2166 2167 #endif 2167 //getchar();2168 getchar(); 2168 2169 #endif 2169 2170 if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/ … … 2348 2349 #endif 2349 2350 strat->enterS(strat->P, 0, strat, strat->tl); 2351 if (TEST_OPT_PROT) 2352 PrintS("-"); 2350 2353 break; 2351 2354 } … … 2365 2368 } 2366 2369 #endif 2370 if (TEST_OPT_PROT) 2371 { 2372 if(strat->P.p != NULL) 2373 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(), 2374 &olddeg,&reduc,strat, red_result); 2375 else 2376 message((strat->honey ? strat->P.ecart : 0), 2377 &olddeg,&reduc,strat, red_result); 2378 } 2367 2379 2368 2380 if (strat->overflow) … … 2825 2837 // } 2826 2838 // } 2827 if (TEST_OPT_PROT) messageStat (hilbcount,strat);2839 if (TEST_OPT_PROT) messageStatSBA(hilbcount,strat); 2828 2840 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 2829 2841 #if SBA_PRINT_SIZE_G -
kernel/GBEngine/kutil.cc
rd6e0c0 r11416e 5522 5522 LObject* p,const kStrategy /*strat*/) 5523 5523 { 5524 if (length<0) return 0; 5525 if (pLtCmp(set[length].sig,p->sig)== currRing->OrdSgn) 5526 return length+1; 5527 5528 int i; 5529 int an = 0; 5530 int en= length; 5531 loop 5532 { 5533 if (an >= en-1) 5534 { 5535 if (pLtCmp(set[an].sig,p->sig) == currRing->OrdSgn) return en; 5536 return an; 5537 } 5538 i=(an+en) / 2; 5539 if (pLtCmp(set[i].sig,p->sig) == currRing->OrdSgn) an=i; 5540 else en=i; 5541 /*aend. fuer lazy == in !=- machen */ 5542 } 5524 if (length<0) return 0; 5525 if (pLtCmp(set[length].sig,p->sig)== currRing->OrdSgn) 5526 return length+1; 5527 5528 int i; 5529 int an = 0; 5530 int en= length; 5531 loop 5532 { 5533 if (an >= en-1) 5534 { 5535 if (pLtCmp(set[an].sig,p->sig) == currRing->OrdSgn) return en; 5536 return an; 5537 } 5538 i=(an+en) / 2; 5539 if (pLtCmp(set[i].sig,p->sig) == currRing->OrdSgn) an=i; 5540 else en=i; 5541 /*aend. fuer lazy == in !=- machen */ 5542 } 5543 } 5544 //sorts the pair list in this order: pLtCmp on the sigs, FDeg, pLtCmp on the polys 5545 int posInLSigRing (const LSet set, const int length, 5546 LObject* p,const kStrategy /*strat*/) 5547 { 5548 assume(currRing->OrdSgn == 1 && rField_is_Ring(currRing)); 5549 if (length<0) return 0; 5550 if (pLtCmp(set[length].sig,p->sig)== 1) 5551 return length+1; 5552 5553 int an,en,i; 5554 an = 0; 5555 en = length+1; 5556 int cmp; 5557 loop 5558 { 5559 if (an >= en-1) 5560 { 5561 if(an == en) 5562 return en; 5563 cmp = pLtCmp(set[an].sig,p->sig); 5564 if (cmp == 1) 5565 return en; 5566 if (cmp == -1) 5567 return an; 5568 if (cmp == 0) 5569 { 5570 if (set[an].FDeg > p->FDeg) 5571 return en; 5572 if (set[an].FDeg < p->FDeg) 5573 return an; 5574 if (set[an].FDeg == p->FDeg) 5575 { 5576 cmp = pLtCmp(set[an].p,p->p); 5577 if(cmp == 1) 5578 return en; 5579 else 5580 return an; 5581 } 5582 } 5583 } 5584 i=(an+en) / 2; 5585 cmp = pLtCmp(set[i].sig,p->sig); 5586 if (cmp == 1) 5587 an = i; 5588 if (cmp == -1) 5589 en = i; 5590 if (cmp == 0) 5591 { 5592 if (set[i].FDeg > p->FDeg) 5593 an = i; 5594 if (set[i].FDeg < p->FDeg) 5595 en = i; 5596 if (set[i].FDeg == p->FDeg) 5597 { 5598 cmp = pLtCmp(set[i].p,p->p); 5599 if(cmp == 1) 5600 an = i; 5601 else 5602 en = i; 5603 } 5604 } 5605 } 5543 5606 } 5544 5607 … … 6467 6530 printf("\nFaugere RewCrit: * divisible by *\n");pWrite(sig);pWrite(strat->sig[k]); 6468 6531 #endif 6532 strat->nrrewcrit++; 6469 6533 return TRUE; 6470 6534 } … … 7083 7147 //Print("%d/%d polynomials in set L (for lazy alg.)",lrmax+1,strat->Lmax); 7084 7148 Print("product criterion:%d chain criterion:%d\n",strat->cp,strat->c3); 7149 if (hilbcount!=0) Print("hilbert series criterion:%d\n",hilbcount); 7150 /* in usual case strat->cv is 0, it gets changed only in shift routines */ 7151 if (strat->cv!=0) Print("shift V criterion:%d\n",strat->cv); 7152 /*mflush();*/ 7153 } 7154 7155 void messageStatSBA (int hilbcount,kStrategy strat) 7156 { 7157 //PrintS("\nUsage/Allocation of temporary storage:\n"); 7158 //Print("%d/%d polynomials in standard base\n",srmax,IDELEMS(Shdl)); 7159 //Print("%d/%d polynomials in set L (for lazy alg.)",lrmax+1,strat->Lmax); 7160 Print("syz criterion:%d rew criterion:%d\n",strat->nrsyzcrit,strat->nrrewcrit); 7161 //Print("product criterion:%d chain criterion:%d\n",strat->cp,strat->c3); 7085 7162 if (hilbcount!=0) Print("hilbert series criterion:%d\n",hilbcount); 7086 7163 /* in usual case strat->cv is 0, it gets changed only in shift routines */ … … 9399 9476 //strat->posInL = posInLSig; 9400 9477 strat->posInL = posInLF5C; 9478 if (rField_is_Ring(currRing)) 9479 { 9480 strat->posInLSba = posInLSigRing; 9481 strat->posInL = posInL11Ring; 9482 } 9401 9483 //strat->posInT = posInTSig; 9402 9484 } -
kernel/GBEngine/kutil.h
rd6e0c0 r11416e 358 358 bool sigdrop; //This is used to check sigdrop in sba over Z 359 359 int nrsyzcrit; // counts how many pairs are deleted by SyzCrit 360 int nrrewcrit; // counts how many pairs are deleted by FaugereRewCrit 360 361 int sbaEnterS; // sba over Z strategy: if sigdrop element has _*gen(sbaEnterS+1), then 361 362 // add directly sbaEnterS elements into S … … 453 454 int posInLSig (const LSet set, const int length, 454 455 LObject* L,const kStrategy strat); 456 int posInLSigRing (const LSet set, const int length, 457 LObject* L,const kStrategy strat); 455 458 int posInLRing (const LSet set, const int length, 456 459 LObject* L,const kStrategy strat); … … 519 522 void message (int i,int* reduc,int* olddeg,kStrategy strat,int red_result); 520 523 void messageStat (int hilbcount,kStrategy strat); 524 void messageStatSBA (int hilbcount,kStrategy strat); 521 525 #ifdef KDEBUG 522 526 void messageSets (kStrategy strat);
Note: See TracChangeset
for help on using the changeset viewer.