Changeset f8fb93d in git
- Timestamp:
- May 17, 2016, 3:33:14 PM (7 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- e6f1e67739dcb8bc40ce2fcd97b4b37cfe8f0302
- Parents:
- 045cbe4a6ae2c0b09895eb1b2407beeb5c723e7e
- Location:
- kernel/GBEngine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd1.cc
r045cbe rf8fb93d 12 12 #define MORA_USE_BUCKETS 13 13 14 #define MYTEST 015 16 14 #define ADIDEBUG 0 17 15 #define ADIDEBUG_NF 0 … … 23 21 #include <misc/options.h> 24 22 #include <misc/intvec.h> 25 26 #if MYTEST27 #ifdef HAVE_TAIL_RING28 #undef HAVE_TAIL_RING29 #endif /* ifdef HAVE_TAIL_RING */30 #endif /* if MYTEST */31 23 32 24 #include <polys/weight.h> … … 1616 1608 kTest_TS(strat); 1617 1609 strat->use_buckets = kMoraUseBucket(strat); 1618 /*- compute-------------------------------------------*/1619 1610 1620 1611 #ifdef HAVE_TAIL_RING … … 1629 1620 } 1630 1621 1622 /*- compute-------------------------------------------*/ 1631 1623 while (strat->Ll >= 0) 1632 1624 { … … 1836 1828 if (strat->P.lcm!=NULL) 1837 1829 { 1838 #if defined(HAVE_RINGS) 1839 pLmDelete(strat->P.lcm); 1830 #ifdef HAVE_RINGS 1831 if (rField_is_Ring(currRing)) pLmDelete(strat->P.lcm); 1832 else 1840 1833 #else 1841 pLmFree(strat->P.lcm);1834 pLmFree(strat->P.lcm); 1842 1835 #endif 1843 1836 strat->P.lcm=NULL; 1844 1837 } 1838 1845 1839 #ifdef KDEBUG 1846 1840 // make sure kTest_TS does not complain about strat->P … … 1866 1860 } 1867 1861 kTest_TS(strat); 1868 1869 #if ADIDEBUG1870 Print("\n The new reducer list T -- at the end of loop %d -- is\n",loop_count);1871 for(int iii=0;iii<=strat->tl;iii++)1872 {1873 printf("\n T[%d]:",iii);1874 p_Write(strat->T[iii].p,strat->tailRing);1875 }1876 PrintLn();1877 1878 loop_count++;1879 #endif /* ADIDEBUG */1880 1862 } 1881 1863 /*- complete reduction of the standard basis------------------------ -*/ … … 2293 2275 idTest(F); 2294 2276 if (Q!=NULL) idTest(Q); 2295 2296 #if MYTEST2297 if (TEST_OPT_DEBUG)2298 {2299 PrintS("// kSTD: currRing: ");2300 rWrite(currRing);2301 }2302 #endif2303 2304 2277 #endif 2305 2278 #ifdef HAVE_PLURAL … … 2504 2477 idTest(F); 2505 2478 idTest(Q); 2506 2507 #if MYTEST2508 if (TEST_OPT_DEBUG)2509 {2510 PrintS("// kSTD: currRing: ");2511 rWrite(currRing);2512 }2513 #endif2514 2515 2479 #endif 2516 2480 #ifdef HAVE_PLURAL -
kernel/GBEngine/kstd2.cc
r045cbe rf8fb93d 14 14 #include <kernel/mod2.h> 15 15 16 #ifndef SING_NDEBUG17 # define MYTEST 018 #else /* ifndef SING_NDEBUG */19 # define MYTEST 020 #endif /* ifndef SING_NDEBUG */21 22 16 #define ADIDEBUG 0 23 17 #define ADIDEBUG_COUNT 0 24 25 #if MYTEST26 # ifdef HAVE_TAIL_RING27 # undef HAVE_TAIL_RING28 # endif // ifdef HAVE_TAIL_RING29 #endif30 18 31 19 // define if no buckets should be used … … 448 436 } 449 437 } 450 #if ADIDEBUG451 pWrite(h->p);452 printf("\nFound j = %i\n",j);pWrite(strat->T[j].p);453 #endif454 438 //enterT(*h, strat); 455 439 ksReducePoly(h, &(strat->T[j]), NULL, NULL, strat); // with debug output 456 #if ADIDEBUG457 printf("\nand after reduce: \n");pWrite(h->p);458 #endif459 440 460 441 if (h->GetLmTailRing() == NULL) … … 1494 1475 kTest_TS(strat); 1495 1476 1496 #ifdef KDEBUG1497 #if MYTEST1498 if (TEST_OPT_DEBUG)1499 {1500 PrintS("bba start GB: currRing: ");1501 // rWrite(currRing);PrintLn();1502 rDebugPrint(currRing);1503 PrintLn();1504 }1505 #endif /* MYTEST */1506 #endif /* KDEBUG */1507 1508 1477 #ifdef HAVE_TAIL_RING 1509 1478 if(!idIs0(F) &&(!rField_is_Ring(currRing))) // create strong gcd poly computes with tailring and S[i] ->to be fixed … … 1524 1493 while (strat->Ll >= 0) 1525 1494 { 1526 #if ADIDEBUG1527 printf("\n ------------------------NEW LOOP\n");1528 printf("\nShdl = \n");1529 #if 01530 idPrint(strat->Shdl);1531 #else1532 for(int ii = 0; ii<=strat->sl;ii++)1533 p_Write(strat->S[ii],strat->tailRing);1534 #endif1535 printf("\n list L\n");1536 int iii;1537 #if 11538 for(iii = 0; iii<= strat->Ll; iii++)1539 {1540 printf("L[%i]:",iii);1541 p_Write(strat->L[iii].p, currRing);1542 p_Write(strat->L[iii].p1, currRing);1543 p_Write(strat->L[iii].p2, currRing);1544 }1545 #else1546 {1547 printf("L[%i]:",strat->Ll);1548 p_Write(strat->L[strat->Ll].p, strat->tailRing);1549 p_Write(strat->L[strat->Ll].p1, strat->tailRing);1550 p_Write(strat->L[strat->Ll].p2, strat->tailRing);1551 }1552 #endif1553 #if 11554 for(iii = 0; iii<= strat->Bl; iii++)1555 {1556 printf("B[%i]:",iii);1557 p_Write(strat->B[iii].p, /*strat->tailRing*/currRing);1558 p_Write(strat->B[iii].p1, /*strat->tailRing*/currRing);1559 p_Write(strat->B[iii].p2, strat->tailRing);1560 }1561 #endif1562 getchar();1563 #endif1564 1495 #ifdef KDEBUG 1565 1496 if (TEST_OPT_DEBUG) messageSets(strat); … … 1636 1567 1637 1568 /* reduction of the element chosen from L */ 1638 #if ADIDEBUG1639 printf("\nBefore \n");pWrite(strat->P.p);1640 #endif1641 1569 red_result = strat->red(&strat->P,strat); 1642 #if ADIDEBUG1643 printf("\nAfter \n");pWrite(strat->P.p);1644 #endif1645 1570 if (errorreported) break; 1646 1571 } … … 1666 1591 int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart); 1667 1592 1668 #ifdef KDEBUG1669 #if MYTEST1670 PrintS("New S: "); p_DebugPrint(strat->P.p, currRing); PrintLn();1671 #endif /* MYTEST */1672 #endif /* KDEBUG */1673 1674 1593 // reduce the tail and normalize poly 1675 1594 // in the ring case we cannot expect LC(f) = 1, … … 1693 1612 #ifdef KDEBUG 1694 1613 if (TEST_OPT_DEBUG){PrintS("new s:");strat->P.wrp();PrintLn();} 1695 #if MYTEST1696 PrintS("New (reduced) S: "); p_DebugPrint(strat->P.p, currRing); PrintLn();1697 #endif /* MYTEST */1698 1614 #endif /* KDEBUG */ 1699 1615 … … 1730 1646 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1731 1647 // posInS only depends on the leading term 1732 #if ADIDEBUG1733 printf("\nThis element is added to S\n");1734 p_Write(strat->P.p, strat->tailRing);p_Write(strat->P.p1, strat->tailRing);p_Write(strat->P.p2, strat->tailRing);1735 #endif1736 1648 strat->enterS(strat->P, pos, strat, strat->tl); 1737 1649 #if 0 … … 1767 1679 } 1768 1680 } 1769 #if ADIDEBUG1770 for(int iii = 0; iii<=strat->tl;iii++)1771 {1772 printf("\nT[%i] = ",iii);pWrite(strat->T[iii].p);1773 }1774 #endif1775 1681 1776 1682 if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat); 1777 1683 // Print("[%d]",hilbeledeg); 1778 1684 if (strat->P.lcm!=NULL) 1685 { 1779 1686 #ifdef HAVE_RINGS 1780 pLmDelete(strat->P.lcm); 1687 if (rField_is_Ring(currRing)) pLmDelete(strat->P.lcm); 1688 else 1781 1689 #else 1782 pLmFree(strat->P.lcm); 1783 #endif 1690 pLmFree(strat->P.lcm); 1691 #endif 1692 strat->P.lcm=NULL; 1693 } 1784 1694 } 1785 1695 else if (strat->P.p1 == NULL && strat->minim > 0) … … 1794 1704 } 1795 1705 #ifdef KDEBUG 1796 #if MYTEST1797 PrintS("bba finish GB: currRing: "); rWrite(currRing);1798 #endif /* MYTEST */1799 1706 if (TEST_OPT_DEBUG) messageSets(strat); 1800 1707 #endif /* KDEBUG */ … … 1868 1775 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1869 1776 1870 #ifdef KDEBUG1871 #if MYTEST1872 PrintS("bba_end: currRing: "); rWrite(currRing);1873 #endif /* MYTEST */1874 #endif /* KDEBUG */1875 1777 idTest(strat->Shdl); 1876 1778 … … 1966 1868 kTest_TS(strat); 1967 1869 1968 #ifdef KDEBUG1969 #if MYTEST1970 if (TEST_OPT_DEBUG)1971 {1972 PrintS("bba start GB: currRing: ");1973 // rWrite(currRing);PrintLn();1974 rDebugPrint(currRing);1975 PrintLn();1976 }1977 #endif /* MYTEST */1978 #endif /* KDEBUG */1979 1980 1870 #ifdef HAVE_TAIL_RING 1981 1871 if(!idIs0(F) &&(!rField_is_Ring(currRing))) // create strong gcd poly computes with tailring and S[i] ->to be fixed … … 2171 2061 int pos = strat->sl+1; 2172 2062 2173 #ifdef KDEBUG2174 #if MYTEST2175 PrintS("New S: "); pDebugPrint(strat->P.p); PrintLn();2176 #endif /* MYTEST */2177 #endif /* KDEBUG */2178 2179 2063 // reduce the tail and normalize poly 2180 2064 // in the ring case we cannot expect LC(f) = 1, … … 2221 2105 #ifdef KDEBUG 2222 2106 if (TEST_OPT_DEBUG){PrintS("new s:");strat->P.wrp();PrintLn();} 2223 #if MYTEST2224 //#if 12225 PrintS("New (reduced) S: "); pDebugPrint(strat->P.p); PrintLn();2226 #endif /* MYTEST */2227 2107 #endif /* KDEBUG */ 2228 2108 … … 2453 2333 } 2454 2334 #ifdef KDEBUG 2455 #if MYTEST2456 PrintS("bba finish GB: currRing: "); rWrite(currRing);2457 #endif /* MYTEST */2458 2335 if (TEST_OPT_DEBUG) messageSets(strat); 2459 2336 #endif /* KDEBUG */ … … 2517 2394 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 2518 2395 2519 #ifdef KDEBUG2520 #if MYTEST2521 PrintS("bba_end: currRing: "); rWrite(currRing);2522 #endif /* MYTEST */2523 #endif /* KDEBUG */2524 2396 #if SBA_PRINT_SIZE_G 2525 2397 size_g_non_red = IDELEMS(strat->Shdl); … … 2906 2778 int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart); 2907 2779 2908 #ifdef KDEBUG2909 #if MYTEST2910 PrintS("New S: "); pDebugPrint(strat->P.p); PrintLn();2911 #endif /* MYTEST */2912 #endif /* KDEBUG */2913 2914 2780 // reduce the tail and normalize poly 2915 2781 // in the ring case we cannot expect LC(f) = 1, … … 2935 2801 #ifdef KDEBUG 2936 2802 if (TEST_OPT_DEBUG){PrintS("new s:");strat->P.wrp();PrintLn();} 2937 #if MYTEST2938 //#if 12939 PrintS("New (reduced) S: "); pDebugPrint(strat->P.p); PrintLn();2940 #endif /* MYTEST */2941 2803 #endif /* KDEBUG */ 2942 2804
Note: See TracChangeset
for help on using the changeset viewer.