Changeset 601105 in git for kernel/kutil.cc
- Timestamp:
- Nov 19, 2013, 6:39:47 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 448b6571955b81192b53dc7300bb54a1984142e3
- Parents:
- 9d864add8f262ed66a3af97f514c37d01844334c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kutil.cc
r9d864a r601105 340 340 ring r = L->tailRing; 341 341 poly p = L->GetLmTailRing(); 342 342 343 343 #ifdef HAVE_RINGS 344 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 345 lc = p_GetCoeff(p,r);346 #endif 344 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 345 lc = p_GetCoeff(p,r); 346 #endif 347 347 348 348 #ifdef HAVE_RINGS_LOC … … 358 358 // } 359 359 h = pNext(p); 360 360 361 361 loop 362 362 { … … 366 366 if (!inNF) 367 367 { 368 369 370 371 372 373 374 375 368 number eins; 369 #ifdef HAVE_RINGS 370 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 371 eins = nCopy(lc); 372 else 373 #endif 374 eins=nInit(1); 375 if (L->p != NULL) pSetCoeff(L->p,eins); 376 376 else if (L->t_p != NULL) nDelete(&pGetCoeff(L->t_p)); 377 377 if (L->t_p != NULL) pSetCoeff0(L->t_p,eins); … … 387 387 if (L->p != NULL && pNext(L->p) != NULL) 388 388 pNext(L->p) = NULL; 389 389 390 390 return; 391 391 } … … 398 398 ///should check also if the lc is a zero divisor, if it divides all the others 399 399 if (rField_is_Ring(currRing) && currRing->OrdSgn == -1) 400 401 400 if(n_DivBy(p_GetCoeff(h,r->cf),lc,r->cf) == 0) 401 return; 402 402 #endif 403 403 if (i == r->N) break; // does divide, try next monom … … 1167 1167 Lp.lcm = pInit(); 1168 1168 pSetCoeff0(Lp.lcm, n_Lcm(pGetCoeff(p), pGetCoeff(strat->S[i]), currRing->cf)); 1169 1169 1170 1170 #if ADIDEBUG 1171 1171 PrintS("\nLp.lcm (lc) = ");pWrite(Lp.lcm); 1172 1172 #endif 1173 1173 1174 1174 // Lp.lcm == 0 1175 1175 if (nIsZero(pGetCoeff(Lp.lcm))) … … 1192 1192 // basic product criterion 1193 1193 pLcm(p,strat->S[i],Lp.lcm); 1194 1194 1195 1195 #if ADIDEBUG 1196 1196 PrintS("\nLp.lcm (lcm) = ");pWrite(Lp.lcm); 1197 1197 #endif 1198 1198 1199 1199 pSetm(Lp.lcm); 1200 1200 assume(!strat->sugarCrit); … … 2772 2772 #if ADIDEBUG 2773 2773 PrintS("\n initenterpairs: \n"); 2774 PrintS(" 2775 PrintS(" 2774 PrintS(" ");p_Write(h, strat->tailRing); 2775 PrintS(" ");p_Write(strat->S[j],strat->tailRing); 2776 2776 #endif 2777 2777 strat->enterOnePair(j,h,ecart,isFromQ,strat, atR); … … 3453 3453 // if (((unsigned long) pGetCoeff(h) % (unsigned long) pGetCoeff(strat->S[j]) != 0) && 3454 3454 // ((unsigned long) pGetCoeff(strat->S[j]) % (unsigned long) pGetCoeff(h) != 0)) 3455 if (( iCompH == pGetComp(strat->S[j]))3455 if (((iCompH == pGetComp(strat->S[j])) 3456 3456 || (0 == pGetComp(strat->S[j]))) 3457 && ((iCompH<=strat->syzComp)||(strat->syzComp==0))) 3457 3458 { 3458 3459 enterOneStrongPoly(j,h,ecart,isFromQ,strat, atR); … … 3588 3589 void superenterpairs (poly h,int k,int ecart,int pos,kStrategy strat, int atR) 3589 3590 { 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 PrintS("enterExtendedSpoly has not changed the list L.");3604 3605 3606 3607 3608 3609 PrintS("enterExtendedSpoly changed the list L: ");3610 PrintLn();3611 3612 3613 3614 PrintS("L[");printf("%d",iii);PrintS("]:");PrintLn();3615 PrintS("");p_Write(strat->L[iii].p1,strat->tailRing);3616 PrintS("");p_Write(strat->L[iii].p2,strat->tailRing);3617 PrintS("");p_Write(strat->L[iii].p,strat->tailRing);3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 PrintS("initenterpairs has not changed the list L.");3628 3629 3630 3631 3632 3633 PrintS("initenterpairs changed the list L: ");3634 PrintLn();3635 3636 3637 3638 PrintS("L[");printf("%d",iii);PrintS("]:");PrintLn();3639 PrintS("");p_Write(strat->L[iii].p1,strat->tailRing);3640 PrintS("");p_Write(strat->L[iii].p2,strat->tailRing);3641 PrintS("");p_Write(strat->L[iii].p,strat->tailRing);3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 PrintS("initenterstrongPairs has not changed the list L.");3652 3653 3654 3655 3656 3657 PrintS("initenterstrongPairs changed the list L: ");3658 PrintLn();3659 3660 3661 3662 PrintS("L[");printf("%d",iii);PrintS("]:");PrintLn();3663 PrintS("");p_Write(strat->L[iii].p1,strat->tailRing);3664 PrintS("");p_Write(strat->L[iii].p2,strat->tailRing);3665 PrintS("");p_Write(strat->L[iii].p,strat->tailRing);3666 3667 3668 3669 3670 3671 3672 3591 #if ADIDEBUG 3592 PrintLn(); 3593 PrintS("Enter superenterpairs"); 3594 PrintLn(); 3595 int iii = strat->Ll; 3596 #endif 3597 assume (rField_is_Ring(currRing)); 3598 // enter also zero divisor * poly, if this is non zero and of smaller degree 3599 if (!(rField_is_Domain(currRing))) enterExtendedSpoly(h, strat); 3600 #if ADIDEBUG 3601 if(iii==strat->Ll) 3602 { 3603 PrintLn(); 3604 PrintS(" enterExtendedSpoly has not changed the list L."); 3605 PrintLn(); 3606 } 3607 else 3608 { 3609 PrintLn(); 3610 PrintS(" enterExtendedSpoly changed the list L: "); 3611 PrintLn(); 3612 for(iii=0;iii<=strat->Ll;iii++) 3613 { 3614 PrintLn(); 3615 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 3616 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 3617 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 3618 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 3619 } 3620 } 3621 iii = strat->Ll; 3622 #endif 3623 initenterpairs(h, k, ecart, 0, strat, atR); 3624 #if ADIDEBUG 3625 if(iii==strat->Ll) 3626 { 3627 PrintLn(); 3628 PrintS(" initenterpairs has not changed the list L."); 3629 PrintLn(); 3630 } 3631 else 3632 { 3633 PrintLn(); 3634 PrintS(" initenterpairs changed the list L: "); 3635 PrintLn(); 3636 for(iii=0;iii<=strat->Ll;iii++) 3637 { 3638 PrintLn(); 3639 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 3640 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 3641 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 3642 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 3643 } 3644 } 3645 iii = strat->Ll; 3646 #endif 3647 initenterstrongPairs(h, k, ecart, 0, strat, atR); 3648 #if ADIDEBUG 3649 if(iii==strat->Ll) 3650 { 3651 PrintLn(); 3652 PrintS(" initenterstrongPairs has not changed the list L."); 3653 PrintLn(); 3654 } 3655 else 3656 { 3657 PrintLn(); 3658 PrintS(" initenterstrongPairs changed the list L: "); 3659 PrintLn(); 3660 for(iii=0;iii<=strat->Ll;iii++) 3661 { 3662 PrintLn(); 3663 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 3664 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 3665 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 3666 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 3667 } 3668 } 3669 PrintLn(); 3670 PrintS("End of superenterpairs"); 3671 PrintLn(); 3672 #endif 3673 clearSbatch(h, k, pos, strat); 3673 3674 } 3674 3675 #endif … … 5780 5781 if (currRing->OrdSgn==-1) 5781 5782 { 5782 5783 5784 5785 5786 5787 5788 5783 /*#ifdef HAVE_RINGS 5784 if (rField_is_Ring(currRing)) 5785 { 5786 h.pCleardenom(); 5787 } 5788 else 5789 #endif*/ 5789 5790 cancelunit(&h); /*- tries to cancel a unit -*/ 5790 5791 deleteHC(&h, strat); … … 7255 7256 { 7256 7257 7257 //if the ordering is local, then hilb criterion 7258 //if the ordering is local, then hilb criterion 7258 7259 //can be used also if tzhe ideal is not homogenous 7259 7260 if((currRing->OrdSgn == -1) && (currRing->MixedOrder == 0 )) … … 7261 7262 { 7262 7263 if(rField_is_Ring(currRing)) 7263 7264 *hilb=NULL; 7264 7265 else 7265 7266 return; 7266 7267 } 7267 7268 #endif … … 8023 8024 /* #ifdef HAVE_RINGS 8024 8025 if (!rField_is_Ring(currRing)) 8025 #endif */ 8026 #endif */ 8026 8027 for (i=1; i<=(currRing->N); i++) 8027 8028 { … … 8129 8130 strat->overflow=FALSE; 8130 8131 ring new_tailRing = rModifyRing(currRing, 8131 8132 8132 // Hmmm .. the condition pFDeg == p_Deg 8133 // might be too strong 8133 8134 #ifdef HAVE_RINGS 8134 (strat->homog && currRing->pFDeg == p_Deg && !(rField_is_Ring(currRing))), // TODO Oliver 8135 8136 8135 (strat->homog && currRing->pFDeg == p_Deg && !(rField_is_Ring(currRing))), // TODO Oliver 8137 8136 #else 8138 8139 #endif 8140 8141 8142 8143 if (new_tailRing == currRing) return TRUE;8137 (strat->homog && currRing->pFDeg == p_Deg), // omit_degree 8138 #endif 8139 (strat->ak==0), // omit_comp if the input is an ideal 8140 expbound); // exp_limit 8141 8142 if (new_tailRing == currRing) return TRUE; 8144 8143 8145 8144 strat->pOrigFDeg_TailRing = new_tailRing->pFDeg; … … 8716 8715 PrintS("ecartWeights: "); 8717 8716 for (int i = rVar(currRing); i > 0; i--) 8718 8717 Print("%hd ", ecartWeights[i]); 8719 8718 PrintLn(); 8720 8719 assume( TEST_OPT_WEIGHTM );
Note: See TracChangeset
for help on using the changeset viewer.