Changeset 601105 in git for kernel/kstd1.cc
- Timestamp:
- Nov 19, 2013, 6:39:47 PM (9 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
- Children:
- 448b6571955b81192b53dc7300bb54a1984142e3
- Parents:
- 9d864add8f262ed66a3af97f514c37d01844334c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd1.cc
r9d864a r601105 364 364 int pass = 0; 365 365 long d,reddeg; 366 367 368 369 370 371 372 373 PrintS("The pair h : "); PrintLn(); PrintLn();374 PrintS("p1 = "); p_Write(h->p1,strat->tailRing); PrintLn();375 PrintS("p2 = "); p_Write(h->p2,strat->tailRing); PrintLn();376 PrintS("p = "); p_Write(h->p,strat->tailRing); PrintLn();377 378 PrintS("The actual reducer T is: ");379 380 381 382 383 384 385 PrintS("T[");printf("%i",iii);PrintS("] = ");p_Write(strat->T[iii].p,strat->tailRing);386 387 388 389 366 367 368 #if ADIDEBUG_NF 369 int iii; 370 PrintLn(); 371 PrintS("---------------------------- NEW REDRILOC COMPUTATION ----------------------------"); 372 PrintLn(); 373 PrintS(" The pair h : "); PrintLn(); PrintLn(); 374 PrintS(" p1 = "); p_Write(h->p1,strat->tailRing); PrintLn(); 375 PrintS(" p2 = "); p_Write(h->p2,strat->tailRing); PrintLn(); 376 PrintS(" p = "); p_Write(h->p,strat->tailRing); PrintLn(); 377 PrintLn(); 378 PrintS(" The actual reducer T is: "); 379 if(strat->tl<0) 380 {PrintS(" Empty.");PrintLn();} 381 else 382 for (iii=0;iii<=strat->tl;iii++) 383 { 384 PrintLn(); 385 PrintS(" T[");printf("%i",iii);PrintS("] = ");p_Write(strat->T[iii].p,strat->tailRing); 386 PrintLn(); 387 } 388 #endif /* ADIDEBUG_NF */ 389 390 390 d = h->GetpFDeg()+ h->ecart; 391 391 reddeg = strat->LazyDegree+d; 392 392 h->SetShortExpVector(); 393 393 #if ADIDEBUG_NF 394 395 PrintS(" 394 PrintLn(); 395 PrintS(" Searching for a poly in T that divides h (of ecart "); 396 396 printf("%i",h->ecart);PrintS(") ..."); 397 397 PrintLn(); … … 401 401 j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h); 402 402 #if ADIDEBUG_NF 403 404 405 406 407 PrintS("Found one: T[");printf("%i",j);408 409 410 411 PrintS("Try to find another with smaller ecart:");412 413 414 415 416 417 PrintS("No poly in T divides h.");418 419 420 403 if(j != -1) 404 { 405 ei = strat->T[j].ecart; 406 PrintLn(); 407 PrintS(" Found one: T[");printf("%i",j); 408 PrintS("] of ecart ");printf("%i",ei); 409 PrintS(": ");p_Write(strat->T[j].p,strat->tailRing); 410 PrintLn(); 411 PrintS(" Try to find another with smaller ecart:"); 412 PrintLn(); 413 } 414 else 415 { 416 PrintLn(); 417 PrintS(" No poly in T divides h."); 418 PrintLn(); 419 } 420 #endif 421 421 if (j < 0) 422 422 { … … 427 427 ei = strat->T[j].ecart; 428 428 ii = j; 429 430 431 429 #if ADIDEBUG_NF 430 iii=ii; 431 #endif 432 432 if (ei > h->ecart && ii < strat->tl) 433 433 { 434 434 li = strat->T[j].length; 435 435 // the polynomial to reduce with (up to the moment) is; 436 436 // pi with ecart ei and length li … … 462 462 } 463 463 } 464 465 464 465 466 466 #if ADIDEBUG_NF 467 467 if(iii == ii) 468 469 470 PrintS("None was found.");471 472 468 { 469 PrintLn(); 470 PrintS(" None was found."); 471 PrintLn(); 472 } 473 473 else 474 475 476 PrintS("A better one (ecart = ");printf("%i",ei);PrintS("): T[");477 478 479 474 { 475 PrintLn(); 476 PrintS(" A better one (ecart = ");printf("%i",ei);PrintS("): T["); 477 printf("%i] = ",ii);p_Write(strat->T[ii].p,strat->tailRing); 478 PrintLn(); 479 } 480 480 #endif 481 481 482 482 } 483 483 … … 514 514 #if ADIDEBUG_NF 515 515 PrintLn(); 516 PrintS("Partial Reduced h = ");p_Write(h->p,strat->tailRing);517 518 516 PrintS(" Partial Reduced h = ");p_Write(h->p,strat->tailRing); 517 PrintLn(); 518 #endif 519 519 strat->fromT=FALSE; 520 520 … … 1142 1142 while (i <= strat->tl) 1143 1143 { 1144 1144 p = strat->T[i]; 1145 1145 deleteHC(&p,strat, TRUE); 1146 1146 /*- tries to cancel a unit: -*/ … … 1195 1195 if (TEST_OPT_FINDET) 1196 1196 return; 1197 1197 1198 1198 #ifndef HAVE_RINGS 1199 1199 strat->red = redFirst; 1200 1200 strat->use_buckets = kMoraUseBucket(strat); 1201 1201 #else 1202 1203 1204 1205 1206 1207 #endif 1208 1202 if ( (!rField_is_Ring(currRing)) || (currRing->OrdSgn != -1)) 1203 { 1204 strat->red = redFirst; 1205 strat->use_buckets = kMoraUseBucket(strat); 1206 } 1207 #endif 1208 1209 1209 updateT(strat); 1210 1210 1211 1211 #ifndef HAVE_RINGS 1212 1212 strat->posInT = posInT2; 1213 1213 reorderT(strat); 1214 1214 #else 1215 1216 1217 1218 1219 1215 if ( (!rField_is_Ring(currRing)) || (currRing->OrdSgn != -1)) 1216 { 1217 strat->posInT = posInT2; 1218 reorderT(strat); 1219 } 1220 1220 #endif 1221 1221 } … … 1256 1256 if (TEST_OPT_FINDET) 1257 1257 return; 1258 1258 1259 1259 /*- cuts elements in L above noether and reorders L -*/ 1260 1260 updateLHC(strat); … … 1377 1377 { 1378 1378 if(currRing->OrdSgn == -1) 1379 1380 else1381 1379 {strat->red = redRiloc;} 1380 else 1381 {strat->red2 = redRing;} 1382 1382 } 1383 1383 #endif … … 1453 1453 strat->HCord = 32000;/*- very large -*/ 1454 1454 } 1455 1455 1456 1456 #ifdef HAVE_RINGS 1457 1458 1457 if (rField_is_Ring(currRing)) 1458 strat->red = redRiloc; 1459 1459 #endif 1460 1460 … … 1587 1587 else strat->noClearS=TRUE; 1588 1588 } 1589 1589 1590 1590 #if ADIDEBUG 1591 1592 1593 1594 1595 1596 1597 1598 1599 PrintS("The pair list L -- in loop ");1600 1601 1602 1603 1604 PrintS("L[");printf("%d",iii);Print("]: ");1605 1606 PrintS("");p_Write(strat->L[iii].p1,strat->tailRing);1607 PrintS("");p_Write(strat->L[iii].p2,strat->tailRing);1608 PrintS("");p_Write(strat->L[iii].p,strat->tailRing);1609 1610 1611 1612 1613 1614 1591 #ifdef KDEBUG 1592 1593 PrintLn(); 1594 PrintS("-------------------------------- LOOP ");printf("%d",loop_count); 1595 PrintS(" ---------------------------------------"); 1596 PrintLn(); 1597 //print the list L: (p1,p2,p) 1598 PrintLn(); 1599 PrintS(" The pair list L -- in loop "); 1600 printf("%d",loop_count);PrintS(" -- is: "); PrintLn(); 1601 for(int iii=0;iii<=strat->Ll;iii++) 1602 { 1603 PrintLn(); 1604 PrintS(" L[");printf("%d",iii);Print("]: "); 1605 PrintLn(); 1606 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 1607 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 1608 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 1609 } 1610 PrintLn(); 1611 #endif 1612 #endif 1613 1614 1615 1615 strat->P = strat->L[strat->Ll];/*- picks the last element from the lazyset L -*/ 1616 1616 if (strat->Ll==0) strat->interpt=TRUE; 1617 1617 strat->Ll--; 1618 1618 1619 #if ADIDEBUG 1620 #ifdef KDEBUG 1621 PrintS("My new pair P = (p1,p2,p) is: "); PrintLn();1622 PrintS("p1 = "); p_Write(strat->P.p1,strat->tailRing);PrintLn();1623 PrintS("p2 = "); p_Write(strat->P.p2,strat->tailRing);PrintLn();1624 PrintS("p = "); p_Write(strat->P.p,strat->tailRing); PrintLn();1625 1626 PrintS("The old reducer list T -- at the beg of loop ");1627 1628 1629 1630 1631 1632 { 1633 1634 PrintS("T[");printf("%d",iii);PrintS("]:");1635 1636 1637 1638 1639 #endif /* ADIDEBUG */ 1640 1619 #if ADIDEBUG 1620 #ifdef KDEBUG 1621 PrintS(" My new pair P = (p1,p2,p) is: "); PrintLn(); 1622 PrintS(" p1 = "); p_Write(strat->P.p1,strat->tailRing);PrintLn(); 1623 PrintS(" p2 = "); p_Write(strat->P.p2,strat->tailRing);PrintLn(); 1624 PrintS(" p = "); p_Write(strat->P.p,strat->tailRing); PrintLn(); 1625 PrintLn(); 1626 PrintS(" The old reducer list T -- at the beg of loop "); 1627 printf("%d",loop_count);PrintS(" -- is :"); 1628 if(strat->tl<0) 1629 {PrintS(" Empty.");PrintLn();} 1630 else 1631 for(int iii=0;iii<=strat->tl;iii++) 1632 { 1633 PrintLn(); 1634 PrintS(" T[");printf("%d",iii);PrintS("]:"); 1635 p_Write(strat->T[iii].p,strat->T->tailRing); 1636 } 1637 PrintLn(); 1638 1639 #endif /* ADIDEBUG */ 1640 #endif 1641 1641 1642 1642 // create the real Spoly … … 1707 1707 if (rField_is_Ring(currRing)) 1708 1708 { 1709 1710 1709 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1710 1711 1711 #if ADIDEBUG 1712 1712 PrintLn(); 1713 PrintS(" The new pair list L -- after superenterpairs in loop "); 1714 printf("%d",loop_count);PrintS(" -- is: "); PrintLn(); 1715 for(int iii=0;iii<=strat->Ll;iii++) 1716 { 1717 PrintLn(); 1718 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 1719 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 1720 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 1721 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 1722 } 1723 #endif 1724 } 1725 1713 PrintS(" The new pair list L -- after superenterpairs in loop "); 1714 printf("%d",loop_count);PrintS(" -- is: "); PrintLn(); 1715 for(int iii=0;iii<=strat->Ll;iii++) 1716 { 1717 PrintLn(); 1718 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 1719 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 1720 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 1721 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 1722 } 1723 #endif 1724 } 1726 1725 else 1727 1726 #endif … … 1733 1732 1734 1733 // apply hilbert criterion 1735 if (hilb!=NULL) 1736 1737 1738 1739 1740 1741 1734 if (hilb!=NULL) 1735 { 1736 if (strat->homog==isHomog) 1737 khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat); 1738 else 1739 khCheckLocInhom(Q,w,hilb,hilbcount,strat); 1740 } 1742 1741 1743 1742 // clear strat->P 1744 1743 if (strat->P.lcm!=NULL) 1745 1744 #if defined(HAVE_RINGS) || defined(HAVE_RINGS_LOC) 1746 1745 pLmDelete(strat->P.lcm); 1747 1746 #else 1748 1747 pLmFree(strat->P.lcm); … … 1772 1771 } 1773 1772 assume(kTest_TS(strat)); 1774 1775 1776 1777 PrintS("The new reducer list T -- at the end of loop ");1778 1779 1780 1781 1782 PrintS("T[");printf("%d",iii);PrintS("]:");1783 1784 1785 1786 1787 1788 #endif /* ADIDEBUG */ 1773 1774 #if ADIDEBUG 1775 PrintLn(); 1776 PrintS(" The new reducer list T -- at the end of loop "); 1777 printf("%d",loop_count);PrintS(" -- is "); PrintLn(); 1778 for(int iii=0;iii<=strat->tl;iii++) 1779 { 1780 PrintLn(); 1781 PrintS(" T[");printf("%d",iii);PrintS("]:"); 1782 p_Write(strat->T[iii].p,strat->tailRing); 1783 } 1784 PrintLn(); 1785 1786 loop_count++; 1787 #endif /* ADIDEBUG */ 1789 1788 } 1790 1789 /*- complete reduction of the standard basis------------------------ -*/ … … 1907 1906 } 1908 1907 #ifdef KDEBUG 1909 // 1908 // kDebugPrint(strat); 1910 1909 #endif 1911 1910 /*- compute------------------------------------------- -*/ … … 2216 2215 { 2217 2216 if(currRing->OrdSgn == -1) 2218 2219 2220 2217 r=mora(F,Q,NULL,hilb,strat); 2218 else 2219 r=bba(F,Q,NULL,hilb,strat); 2221 2220 } 2222 2221 else … … 2379 2378 r=sba(F,Q,*w,hilb,strat); 2380 2379 else 2381 2380 r=sba(F,Q,NULL,hilb,strat); 2382 2381 } 2383 2382 } … … 3119 3118 idDelete(&FF); 3120 3119 null=idInit(1,1); 3121 if (need_retry) 3122 res1=kNF(null,Q,res,0,KSTD_NF_LAZY); 3123 else 3124 res1=kNF(null,Q,res); 3120 if (need_retry) 3121 res1=kNF(null,Q,res,0,KSTD_NF_LAZY); 3122 else 3123 res1=kNF(null,Q,res); 3125 3124 idDelete(&res); 3126 3125 res=res1;
Note: See TracChangeset
for help on using the changeset viewer.