Changeset ef2729 in git for kernel/GBEngine/kstd2.cc
- Timestamp:
- Jul 26, 2016, 2:59:40 PM (8 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
- Children:
- e40da9f8133273ff0b3617f2e95f7bedfa0266bc
- Parents:
- d249822f7b7eb06239bfc2809c5847e0265ceb97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd2.cc
rd249822 ref2729 10 10 #include <kernel/mod2.h> 11 11 12 #define ADIDEBUG 0 13 #define ADIDEBUG_COUNT 0 12 //#define ADIDEBUG 0 14 13 #define GCD_SBA 1 15 14 … … 698 697 //where the sig remains the same and replace h by this gcd poly 699 698 #if GCD_SBA 700 #if ADIDEBUG699 #ifdef ADIDEBUG 701 700 printf("\nBefore sbaCheckGcdPair ");pWrite(h->p); 702 701 #endif … … 704 703 while(sbaCheckGcdPair(h,strat)) 705 704 { 706 #if ADIDEBUG705 #ifdef ADIDEBUG 707 706 printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p); 708 707 #endif 709 708 h->sev = pGetShortExpVector(h->p); 710 709 } 711 #if ADIDEBUG710 #ifdef ADIDEBUG 712 711 printf("\nAfter sbaCheckGcdPair ");pWrite(h->p); 713 712 #endif … … 721 720 //printf("FDEGS: %ld -- %ld\n",h->FDeg, h->pFDeg()); 722 721 assume(h->FDeg == h->pFDeg()); 723 #if ADIDEBUG722 #ifdef ADIDEBUG 724 723 printf("\n--------------------------redSig-------------------------------------\n"); 725 724 printf("\nBefore redSig:\n"); … … 756 755 { 757 756 #if GCD_SBA 758 #if ADIDEBUG757 #ifdef ADIDEBUG 759 758 printf("\nBefore sbaCheckGcdPair ");pWrite(h->p); 760 759 #endif … … 762 761 while(sbaCheckGcdPair(h,strat)) 763 762 { 764 #if ADIDEBUG763 #ifdef ADIDEBUG 765 764 printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p); 766 765 #endif … … 769 768 start = 0; 770 769 } 771 #if ADIDEBUG770 #ifdef ADIDEBUG 772 771 printf("\nAfter sbaCheckGcdPair ");pWrite(h->p); 773 772 #endif … … 794 793 if(pLtCmp(beforeredsig,h->sig) == 1) 795 794 { 796 #if ADIDEBUG795 #ifdef ADIDEBUG 797 796 printf("\nSigDrop after reduce\n");pWrite(beforeredsig);pWrite(h->sig); 798 797 #endif … … 803 802 { 804 803 //It reduced to 0, cancel the sigdrop 805 #if ADIDEBUG804 #ifdef ADIDEBUG 806 805 printf("\nReduced to 0 via redRing. Cancel sigdrop\n"); 807 806 #endif … … 812 811 else 813 812 { 814 #if ADIDEBUG813 #ifdef ADIDEBUG 815 814 printf("\nReduced to this via redRing.SIGDROP\n");pWrite(h->p); 816 815 #endif … … 906 905 printf("INDEX OF REDUCER T: %d\n",ii); 907 906 #endif 908 #if ADIDEBUG907 #ifdef ADIDEBUG 909 908 printf("\nWe reduce it with:\n");p_Write(strat->T[ii].p,strat->tailRing);pWrite(strat->T[ii].sig); 910 909 #endif 911 910 sigSafe = ksReducePolySig(h, &(strat->T[ii]), strat->S_2_R[ii], NULL, NULL, strat); 912 #if ADIDEBUG911 #ifdef ADIDEBUG 913 912 printf("\nAfter small reduction:\n");pWrite(h->p);pWrite(h->sig); 914 913 #endif … … 923 922 if(rField_is_Ring(currRing) && h->p != NULL && pLmCmp(h->p,strat->T[ii].p)==0) 924 923 { 925 #if ADIDEBUG924 #ifdef ADIDEBUG 926 925 printf("\nReducer and Original have same LT. Force it with redRing!\n"); 927 926 #endif … … 929 928 if(red_result == 0) 930 929 { 931 #if ADIDEBUG930 #ifdef ADIDEBUG 932 931 printf("\nRedRing reduced it to 0. Perfect\n"); 933 932 #endif … … 937 936 else 938 937 { 939 #if ADIDEBUG938 #ifdef ADIDEBUG 940 939 printf("\nRedRing reduced it to *.\nHave to sigdrop now\n");pWrite(h->p); 941 940 #endif … … 1080 1079 } 1081 1080 strat->redTailChange=TRUE; 1082 #if ADIDEBUG1081 #ifdef ADIDEBUG 1083 1082 printf("\nWill TAILreduce * with *:\n");pWrite(Ln.p);pWrite(Ln.sig); 1084 1083 pWrite(With->p);pWrite(With->sig);pWrite(L->sig); … … 1089 1088 //Because Ln.sig is set to L->sig, but in ksReducePolyTailSig -> ksReducePolySig 1090 1089 // I delete it an then set Ln.sig. Hence L->sig is lost 1091 #if ADIDEBUG1090 #ifdef ADIDEBUG 1092 1091 printf("\nAfter small TAILreduce:\n");pWrite(Ln.p);pWrite(Ln.sig);pWrite(L->sig); 1093 1092 #endif … … 1706 1705 while (strat->Ll >= 0) 1707 1706 { 1708 #if ADIDEBUG1707 #ifdef ADIDEBUG 1709 1708 printf("\n ------------------------NEW LOOP\n"); 1710 1709 printf("\nShdl = \n"); … … 1894 1893 // posInS only depends on the leading term 1895 1894 strat->enterS(strat->P, pos, strat, strat->tl); 1896 #if ADIDEBUG1895 #ifdef ADIDEBUG 1897 1896 printf("\nThis element has been added to S:\n");pWrite(strat->P.p);pWrite(strat->P.p1);pWrite(strat->P.p2); 1898 1897 #endif … … 2217 2216 while (strat->Ll >= 0) 2218 2217 { 2219 #if ADIDEBUG2218 #ifdef ADIDEBUG 2220 2219 printf("\n ------------------------NEW LOOP\n"); 2221 2220 printf("\nShdl = \n"); … … 2312 2311 strat->sbaEnterS = pGetComp(strat->P.sig) - 1; 2313 2312 2314 #if ADIDEBUG2313 #ifdef ADIDEBUG 2315 2314 printf("\n-------------------------\nThis is the current element P\n"); 2316 2315 pWrite(strat->P.p); … … 2423 2422 strat->P.sev = pGetShortExpVector(strat->P.p); 2424 2423 } 2425 #if ADIDEBUG2424 #ifdef ADIDEBUG 2426 2425 printf("\nAfter reduce (redresult=%i): \n",red_result);pWrite(strat->P.p);pWrite(strat->P.sig); 2427 2426 #endif … … 2430 2429 { 2431 2430 //First reduce it as much as one can 2432 #if ADIDEBUG2431 #ifdef ADIDEBUG 2433 2432 printf("\nSigdrop in the reduce. Trying redring\n"); 2434 2433 #endif … … 2436 2435 if(red_result == 0) 2437 2436 { 2438 #if ADIDEBUG2437 #ifdef ADIDEBUG 2439 2438 printf("\nSigdrop cancelled since redRing reduced to 0\n"); 2440 2439 #endif … … 2445 2444 else 2446 2445 { 2447 #if ADIDEBUG2446 #ifdef ADIDEBUG 2448 2447 printf("\nStill Sigdrop - redRing reduced to:\n");pWrite(strat->P.p); 2449 2448 #endif … … 2456 2455 if(strat->blockred > strat->blockredmax) 2457 2456 { 2458 #if ADIDEBUG2457 #ifdef ADIDEBUG 2459 2458 printf("\nToo many blocked reductions\n"); 2460 2459 #endif … … 2550 2549 if(rField_is_Ring(currRing) && strat->sigdrop) 2551 2550 { 2552 #if ADIDEBUG2551 #ifdef ADIDEBUG 2553 2552 printf("\n Still sigdrop after redtailSba - it reduced to \n");pWrite(strat->P.p); 2554 2553 #endif … … 2561 2560 if(strat->P.sig == NULL || pLtCmp(beforetailred,strat->P.sig) == 1) 2562 2561 { 2563 #if ADIDEBUG2562 #ifdef ADIDEBUG 2564 2563 printf("\nSigDrop after TAILred\n");pWrite(beforetailred);pWrite(strat->P.sig); 2565 2564 #endif … … 2570 2569 { 2571 2570 //It reduced to 0, cancel the sigdrop 2572 #if ADIDEBUG2571 #ifdef ADIDEBUG 2573 2572 printf("\nReduced to 0 via redRing. Cancel sigdrop\n"); 2574 2573 #endif … … 2578 2577 else 2579 2578 { 2580 #if ADIDEBUG2579 #ifdef ADIDEBUG 2581 2580 printf("\nReduced to this via redRing.SIGDROP\n");pWrite(strat->P.p); 2582 2581 #endif … … 2590 2589 goto case_when_red_result_changed; 2591 2590 } 2592 #if ADIDEBUG2591 #ifdef ADIDEBUG 2593 2592 printf("\nNach redTailSba: \n"); 2594 2593 pWrite(strat->P.p);pWrite(strat->P.sig); … … 2651 2650 else 2652 2651 enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl); 2653 #if ADIDEBUG2652 #ifdef ADIDEBUG 2654 2653 printf("\nThis element is added to S\n"); 2655 2654 p_Write(strat->P.p, strat->tailRing);p_Write(strat->P.p1, strat->tailRing);p_Write(strat->P.p2, strat->tailRing);pWrite(strat->P.sig);
Note: See TracChangeset
for help on using the changeset viewer.