- Timestamp:
- Oct 13, 2015, 4:23:20 PM (9 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 125de5072e1ff0136a3939cd8b878be9f8d71e69
- Parents:
- 212806f6073de03851c64acb881326ea4667bad2
- Location:
- kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd1.cc
r212806 r19a089f 501 501 assume(h->FDeg == h->pFDeg()); 502 502 at = strat->posInL(strat->L,strat->Ll,h,strat); 503 #if 0 504 //#ifdef HAVE_RINGS 505 if(rField_is_Ring(currRing)) 506 strat->fromT=FALSE; 507 #endif 503 508 if (at <= strat->Ll && pLmCmp(h->p, strat->L[strat->Ll].p) != 0 && !nEqual(h->p->coef, strat->L[strat->Ll].p->coef)) 504 509 { … … 506 511 /*- h will not become the next element to reduce -*/ 507 512 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 508 #ifdef KDEBUG513 #ifdef KDEBUG 509 514 if (TEST_OPT_DEBUG) Print(" ecart too big; -> L%d\n",at); 510 #endif515 #endif 511 516 h->Clear(); 512 517 strat->fromT = FALSE; 513 518 return -1; 519 514 520 #else 515 521 516 LObject* h2; 517 pWrite(h->p); 518 h2->tailRing = h->tailRing; 519 h2->p = pCopy(h->p); 520 pWrite(h2->p); 521 strat->initEcart(h2); 522 h2->sev = h->sev; 523 doRed(h,&(strat->T[ii]),strat->fromT,strat); 524 #if ADIDEBUG_NF 525 printf("\nPartial reduced (ecart = %i) h: ",h->ecart);pWrite(h->p); 526 #endif 527 if(h->IsNull()) 528 { 529 if (h->lcm!=NULL) 522 LObject* h2; 523 pWrite(h->p); 524 h2->tailRing = h->tailRing; 525 h2->p = pCopy(h->p); 526 pWrite(h2->p); 527 strat->initEcart(h2); 528 h2->sev = h->sev; 529 doRed(h,&(strat->T[ii]),FALSE,strat); 530 #if ADIDEBUG_NF 531 printf("\nPartial reduced (ecart = %i) h: ",h->ecart);pWrite(h->p); 532 #endif 533 if(h->IsNull()) 530 534 { 531 pLmDelete(h->lcm); 535 if (h->lcm!=NULL) 536 { 537 pLmDelete(h->lcm); 538 } 539 h->Clear(); 540 h2->Clear(); 541 return 0; 532 542 } 533 h->Clear(); 534 h2->Clear(); 535 return 0; 536 } 537 strat->initEcart(h); 538 h->sev = pGetShortExpVector(h->p); 539 at = strat->posInL(strat->L,strat->Ll,h,strat); 540 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 541 #if ADIDEBUG_NF 542 printf("\nThis was reduced and went to L: ");pWrite(h->p); 543 #endif 544 at = strat->posInL(strat->L,strat->Ll,h2,strat); 545 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h2,at); 546 #if ADIDEBUG_NF 547 printf("\nThis was reduced and went to L: ");pWrite(h2->p); 548 #endif 549 //This means the pair won't go into T 550 return 3; 543 strat->initEcart(h); 544 h->sev = pGetShortExpVector(h->p); 545 at = strat->posInL(strat->L,strat->Ll,h,strat); 546 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 547 #if ADIDEBUG_NF 548 printf("\nThis was reduced and went to L: ");pWrite(h->p); 549 #endif 550 at = strat->posInL(strat->L,strat->Ll,h2,strat); 551 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h2,at); 552 #if ADIDEBUG_NF 553 printf("\nThis was reduced and went to L: ");pWrite(h2->p); 554 #endif 555 //This means the pair won't go into T 556 return 3; 551 557 #endif 552 558 } … … 870 876 * we have to reduce with bad ecart: H has to enter in T 871 877 */ 878 #if ADIDEBUG_NF 879 printf("\nHAVE TO REDUCE IT WITH BIGGER ECART\n"); 880 #endif 872 881 doRed(&H,&(strat->T[ii]),TRUE,strat); 873 882 if (H.p == NULL) … … 910 919 #if ADIDEBUG_NF 911 920 printf("\nAfter the small reduction it looks like this:\n");pWrite(H.p); 912 //getchar();921 getchar(); 913 922 #endif 914 923 /*- try to reduce the s-polynomial -*/ … … 1340 1349 { 1341 1350 enterSBba(p, atS, strat, atR); 1342 //#ifdef HAVE_RINGS1343 // if (rField_is_Ring(currRing))1344 // return;1345 //#endif1346 1351 #ifdef KDEBUG 1347 1352 if (TEST_OPT_DEBUG) … … 1800 1805 { 1801 1806 //int inittl = strat->tl; 1802 //enterT(strat->P,strat);1803 enterT_strong(strat->P,strat);1807 enterT(strat->P,strat); 1808 //enterT_strong(strat->P,strat); 1804 1809 //strat->tl = inittl+1; 1805 1810 } … … 2158 2163 h.sev = strat->sevS[j]; 2159 2164 h.SetpFDeg(); 2165 #ifdef HAVE_RINGS 2166 if(rField_is_Ring(currRing) && rHasLocalOrMixedOrdering(currRing)) 2167 enterT_strong(h,strat); 2168 else 2169 #endif 2160 2170 enterT(h,strat); 2161 2171 } -
kernel/GBEngine/kstd2.cc
r212806 r19a089f 19 19 # define MYTEST 0 20 20 #endif /* ifndef SING_NDEBUG */ 21 22 #define ADIDEBUG 0 23 #define ADIDEBUG_COUNT 0 21 24 22 25 #if MYTEST … … 72 75 * SBA stuff -- done 73 76 ***********************************************/ 74 #define ADIDEBUG 075 #define ADIDEBUG_COUNT 076 77 77 78 #include <kernel/GBEngine/kutil.h> … … 1558 1559 } 1559 1560 #endif 1560 //getchar();1561 getchar(); 1561 1562 #endif 1562 1563 #ifdef KDEBUG -
kernel/GBEngine/kutil.cc
r212806 r19a089f 11 11 12 12 #define MYTEST 0 13 14 #define ADIDEBUG 0 13 15 14 16 #include <kernel/mod2.h> … … 77 79 #endif 78 80 79 #define ADIDEBUG 080 81 81 denominator_list DENOMINATOR_LIST=NULL; 82 82 … … 338 338 lc = pGetCoeff(p); 339 339 #endif 340 340 #if ADIDEBUG 341 printf("\n cancelunit\n"); 342 pWrite(p); 343 #endif 341 344 #ifdef HAVE_RINGS 342 345 // Leading coef have to be a unit … … 403 406 // Note: As long as qring j forbidden if j contains integer (i.e. ground rings are 404 407 // domains), no zerodivisor test needed CAUTION 405 if (rField_is_Ring(r) /*&&(rHasLocalOrMixedOrdering(r)) */) 406 if(n_DivBy(pGetCoeff(h),lc,r->cf) == 0) 407 return; 408 #if ADIDEBUG 409 pWrite(h); 410 #endif 411 if (rField_is_Ring(r) && !n_DivBy(pGetCoeff(h),lc,r->cf)) 412 { 413 #if ADIDEBUG 414 printf("\nDoes not divide\n"); 415 #endif 416 return; 417 } 418 #if ADIDEBUG 419 printf("\nDivides. Go On\n"); 420 #endif 408 421 #endif 409 422 pIter(h); … … 1443 1456 pWrite(h.lcm); 1444 1457 #endif 1445 if ((n_DivBy(strat->B[j].lcm->coef, h.lcm->coef, currRing->cf) == 0) && ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)))1458 if ((n_DivBy(strat->B[j].lcm->coef, h.lcm->coef, currRing->cf)) && ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))) 1446 1459 { 1447 1460 strat->c3++; … … 1465 1478 pWrite(h.lcm); 1466 1479 #endif 1467 if(n_DivBy( h.lcm->coef, strat->B[j].lcm->coef, currRing->cf) == 0)1480 if(n_DivBy( h.lcm->coef, strat->B[j].lcm->coef, currRing->cf)) 1468 1481 { 1469 1482 #if ADIDEBUG … … 1490 1503 pWrite(strat->S[i]); 1491 1504 #endif 1492 if ((n_DivBy(strat->B[j].lcm->coef, h.lcm->coef, currRing->cf) == 0) && (strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))1505 if ((n_DivBy(strat->B[j].lcm->coef, h.lcm->coef, currRing->cf)) && (strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1493 1506 { 1494 1507 #if ADIDEBUG … … 1511 1524 pWrite(strat->B[j].p1); 1512 1525 pWrite(strat->B[j].p2); 1526 pWrite(strat->B[j].lcm); 1513 1527 printf("\nh - neue Paar\n"); 1514 1528 pWrite(h.p); 1515 1529 pWrite(p); 1516 1530 pWrite(strat->S[i]); 1531 pWrite(h.lcm); 1517 1532 #endif 1518 if(n_DivBy( h.lcm->coef, strat->B[j].lcm->coef,currRing->cf) == 0)1533 if(n_DivBy( h.lcm->coef, strat->B[j].lcm->coef,currRing->cf)) 1519 1534 { 1520 1535 #if ADIDEBUG … … 1749 1764 if(h.IsNull()) return FALSE; 1750 1765 int red_result; 1751 if(strat->L != NULL)1752 red_result = strat->red(&h,strat);1766 //if(strat->L != NULL) 1767 red_result = strat->red(&h,strat); 1753 1768 if(!h.IsNull()) 1754 enterT _strong(h, strat,-1);1769 enterT(h, strat,-1); 1755 1770 } 1756 1771 //#if 1 … … 8015 8030 assume(p.sev == 0 || pGetShortExpVector(p.p) == p.sev); 8016 8031 strat->sevT[atT] = (p.sev == 0 ? pGetShortExpVector(p.p) : p.sev); 8017 #if 18018 #ifdef HAVE_RINGS8019 if(rField_is_Ring(currRing) &&8020 rHasLocalOrMixedOrdering(currRing) && !n_IsUnit(p.p->coef, currRing->cf))8021 {8022 #if ADIDEBUG_NF8023 printf("\nDas ist p:\n");pWrite(p.p);8024 #endif8025 for(i=strat->tl;i>=0;i--)8026 {8027 if(strat->T[i].ecart <= p.ecart && pLmDivisibleBy(strat->T[i].p,p.p))8028 {8029 #if ADIDEBUG_NF8030 printf("\nFound one: %i\n",i);pWrite(strat->T[i].p);8031 #endif8032 enterOneStrongPoly(i,p.p,p.ecart,0,strat,0 , TRUE);8033 }8034 }8035 }8036 /*8037 printf("\nThis is T:\n");8038 for(i=strat->tl;i>=0;i--)8039 {8040 pWrite(strat->T[i].p);8041 }8042 //getchar();*/8043 #endif8044 #endif8045 8032 kTest_T(&(strat->T[atT])); 8046 8033 } … … 8127 8114 assume(p.sev == 0 || pGetShortExpVector(p.p) == p.sev); 8128 8115 strat->sevT[atT] = (p.sev == 0 ? pGetShortExpVector(p.p) : p.sev); 8129 #if 08116 #if 1 8130 8117 #ifdef HAVE_RINGS 8131 8118 if(rField_is_Ring(currRing) && !n_IsUnit(p.p->coef, currRing->cf)) 8132 8119 { 8133 #if ADIDEBUG _NF8120 #if ADIDEBUG 8134 8121 printf("\nDas ist p:\n");pWrite(p.p); 8135 8122 #endif … … 8138 8125 if(strat->T[i].ecart <= p.ecart && pLmDivisibleBy(strat->T[i].p,p.p)) 8139 8126 { 8140 #if ADIDEBUG _NF8127 #if ADIDEBUG 8141 8128 printf("\nFound one: %i\n",i);pWrite(strat->T[i].p); 8142 8129 #endif -
kernel/combinatorics/hdegree.cc
r212806 r19a089f 1010 1010 int i; 1011 1011 int k = ak; 1012 1013 1012 #if HAVE_RINGS 1014 1013 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 1015 1014 { 1016 //consider just monic generators (over rings with zero-divisors) 1017 ideal SS=id_Copy(S,tailRing); 1018 for(i=0;i<=idElem(SS);i++) 1019 { 1020 if(pIsPurePower(SS->m[i])==0) 1021 p_Delete(&SS->m[i],tailRing); 1015 //consider just monic generators (over rings with zero-divisors) 1016 ideal SS=id_Copy(S,tailRing); 1017 for(i=0;i<=idElem(S);i++) 1018 { 1019 if(p_IsPurePower(SS->m[i],tailRing)==0) 1020 { 1021 p_Delete(&SS->m[i],tailRing); 1022 } 1022 1023 } 1023 1024 S=id_Copy(SS,tailRing); 1024 } 1025 idSkipZeroes(S); 1026 } 1027 #if 0 1028 printf("\nThis is HC:\n"); 1029 for(int ii=0;ii<=idElem(S);ii++) 1030 { 1031 pWrite(S->m[ii]); 1032 } 1033 //getchar(); 1025 1034 #endif 1026 1035 #endif 1036 if(idElem(S) == 0) 1037 return; 1027 1038 hNvar = (currRing->N); 1028 1039 hexist = hInit(S, Q, &hNexist, tailRing); // tailRing?
Note: See TracChangeset
for help on using the changeset viewer.