Changeset e3b5ed in git for kernel/f5gb.cc


Ignore:
Timestamp:
May 4, 2009, 3:30:53 PM (15 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
233f2e504906a97e837a6704ca5f2f22d86c4bb8
Parents:
39e4239ad700dd19503501b393c68b7aabd191b5
Message:
added symbolic preprocessing to the reduction process


git-svn-id: file:///usr/local/Singular/svn/trunk@11764 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/f5gb.cc

    r39e423 re3b5ed  
    109109*/
    110110LList* F5inc(int i, poly f_i, LList* gPrev, ideal gbPrev, poly ONE, LTagList* lTag, RList* rules, RTagList* rTag) {
    111     Print("in f5inc\n");           
     111    //Print("in f5inc\n");           
    112112    //pWrite(rules->getFirst()->getRuleTerm());
    113113    int j;
     
    147147        //int timer4  =   initTimer();
    148148        //startTimer();
    149         critPairs->print();
     149        //critPairs->print();
    150150        computeSPols(critPairsMinDeg,rTag,rules,sPolyList);
    151151        //timer4  =   getTimer();
     
    162162        //int timer3  =   initTimer();
    163163        //startTimer();
    164         sPolyList->print();
    165         reduction(sPolyList, critPairs, gPrev, rules, lTag, rTag, gbPrev);
    166         //newReduction(sPolyList, critPairs, gPrev, rules, lTag, rTag, gbPrev);
     164        //sPolyList->print();
     165        //reduction(sPolyList, critPairs, gPrev, rules, lTag, rTag, gbPrev);
     166        newReduction(sPolyList, critPairs, gPrev, rules, lTag, rTag, gbPrev);
    167167        //timer3      =  getTimer();
    168168        //reductionTime = reductionTime + timer3;
     
    357357            //Print("%d\n",testNode->getIndex());
    358358            if(pLmDivisibleByNoComp(testNode->getPoly(),u1)) {
    359                 Print("Criterion 1 NOT passed!\n");
     359                //Print("Criterion 1 NOT passed!\n");
    360360                return true;
    361361            }
     
    482482        //Print("%d\n",testNode->getRuleIndex());
    483483        if(pLmDivisibleByNoComp(testNode->getRuleTerm(),u1)) {
    484             Print("-----------------Criterion 2 NOT passed!-----------------------------------\n");
     484            //Print("-----------------Criterion 2 NOT passed!-----------------------------------\n");
    485485            //Print("INDEX: %d\n",l->getIndex());
    486486            pDelete(&u1);
     
    528528        //pWrite(testNode->getRuleTerm());
    529529        if(pLmDivisibleByNoComp(testNode->getRuleTerm(),u1)) {
    530             Print("--------------------------Criterion 2 NOT passed!------------------------------\n");
     530            //Print("--------------------------Criterion 2 NOT passed!------------------------------\n");
    531531            //Print("INDEX: %d\n",l->getIndex());
    532532            pDelete(&u1);
     
    587587                            //Print("RULE ADDED: \n");
    588588                            //pWrite(rules->getFirst()->getRuleTerm());
     589                            //rules->print();
    589590                            // as sp = NULL, delete it
    590591                            pDelete(&sp);
     
    596597                            //Print("RULE ADDED: \n");
    597598                            //pWrite(rules->getFirst()->getRuleTerm()); 
     599                            //rules->print();
    598600                            sPolyList->insertByLabel(ppMult_qq(temp->getT1(),temp->getLp1Term()),temp->getLp1Index(),sp,rules->getFirst()->getRule());
    599601                        }
     
    620622                        //Print("RULE ADDED: \n");
    621623                        //pWrite(rules->getFirst()->getRuleTerm());
     624                        //rules->print();
    622625                        // as sp = NULL, delete it
    623626                        pDelete(&sp);
     
    628631                        //Print("RULE ADDED: \n");
    629632                        //pWrite(rules->getFirst()->getRuleTerm());
     633                        //rules->print();
    630634                        //Print("%d\n",rules->getFirst()->getRuleIndex());
    631635                        //Print("%p\n",sPolyList->getFirst());
     
    665669        // delete the above first element from sPolyList, temp will be either reduced to
    666670        // zero or added to gPrev, but never come back to sPolyList
     671        //pWrite(sPolyList->getFirst()->getPoly());
     672        //Print("LIST OF SPOLYNOMIALS!\n");
     673        //sPolyList->print();
    667674        sPolyList->setFirst(temp->getNext());
    668675        poly tempNF = kNF(gbPrev,currQuotient,temp->getPoly());
     
    673680            // with label index = current label index: this is done such that there
    674681            // is no label corruption during the reduction process
     682            //Print("lower label reduction:  ");
     683            //pWrite(tempNF);
    675684            topReduction(temp,sPolyList,gPrev,critPairs,rules,lTag,rTag,gbPrev);
    676685       
     
    699708    // check if sPolyList has any elements
    700709    // NOTE: due to initialization sPolyList always has a default NULL element
     710    //Print("--1--\n");
    701711    LNode* temp = sPolyList->getFirst();
    702712    while(NULL != temp) {
     
    706716        // delete the above first element from sPolyList, temp will be either reduced to
    707717        // zero or added to gPrev, but never come back to sPolyList
     718        //Print("LIST OF SPOLYNOMIALS!\n");
     719        //sPolyList->print();
     720        //pWrite(sPolyList->getFirst()->getPoly());
    708721        sPolyList->setFirst(temp->getNext());
    709         poly tempNF = kNF(gbPrev,currQuotient,temp->getPoly());
    710         if(NULL != tempNF) {
    711             pNorm(tempNF);
    712             temp->setPoly(tempNF);
     722        //pWrite(temp->getPoly());
     723        //poly tempNF = kNF(gbPrev,currQuotient,temp->getPoly());
     724        //Print("!!!\n");
     725        //if(NULL != tempNF) {
     726            //pNorm(tempNF);
     727            //temp->setPoly(tempNF);
     728            //Print("lower label reduction:  ");
     729            //pWrite(tempNF);
    713730            // try further reductions of temp with polynomials in gPrev
    714731            // with label index = current label index: this is done such that there
    715732            // is no label corruption during the reduction process
    716             findReducers(temp,sPolyList,gPrev,critPairs,rules,lTag,rTag);
    717         }
    718         else {
    719             reductionsToZero++;
    720             delete temp;
    721         }
     733            findReducers(temp,sPolyList,gbPrev,gPrev,critPairs,rules,lTag,rTag);
     734        //}
     735        //else {
     736        //    reductionsToZero++;
     737        //    delete temp;
     738        //}
    722739        //if(NULL != temp->getPoly()) {
    723740        //    criticalPair(gPrev,critPairs,lTag,rTag,rules);
    724741        //}
     742        //Print("HIER AUCH ?\n");
     743        //Print("--2--\n");
     744        //sPolyList->print();
     745        //critPairs->print();
    725746        temp =   sPolyList->getFirst();
     747        //Print("%p\n",temp);
    726748    }
    727749    //sPolyList->print();
    728750    //delete sPolyList;
     751    //Print("REDUCTION FERTIG\n");
    729752}     
    730753
     
    742765 * ================================================================================
    743766*/
    744 void findReducers(LNode* l, LList* sPolyList, LList* gPrev, CList* critPairs, RList* rules, LTagList* lTag, RTagList* rTag) {
     767void findReducers(LNode* l, LList* sPolyList, ideal gbPrev, LList* gPrev, CList* critPairs, RList* rules, LTagList* lTag, RTagList* rTag) {
    745768    LList* good         =   new LList();
    746769    LList* bad          =   new LList();
     
    750773    LNode* tempRed      =   lTag->getFirstCurrentIdx();
    751774    LNode* tempMon      =   monomials->getFirst();
    752     Print("IN FIND REDUCERS:  ");
    753     pWrite(l->getPoly());
     775    poly tempPoly       =   pInit();
     776    //Print("IN FIND REDUCERS:  ");
     777    //pWrite(l->getPoly());
     778   
    754779    while(NULL != tempMon) {
    755780        // iteration over all monomials in tempMon
    756         poly tempPoly   =   tempMon->getPoly();
     781        tempPoly   =   pCopy(l->getPoly());
     782        //Print("______________________NEW POLYNOMIAL TESTED IN MONOMIALS_______________________\n");
     783       
    757784        while(NULL != tempPoly) {
    758785            // iteration of all elements in gPrev of the current index
     786           
     787            //Print("LABEL OF REDUCED ELEMENT:    ");
     788            //Print("%p\n",tempPoly);
     789            //pWrite(tempPoly);
     790            pNorm(tempPoly);
     791            //pWrite(l->getTerm());
     792            tempRed =   gPrev->getFirst();
     793            //tempRed =   lTag->getFirstCurrentIdx();
    759794            while(NULL != tempRed) {
    760                 if(pDivisibleBy(tempRed->getPoly(),tempPoly)) {
     795                //Print("POSSIBLE REDUCER:  ");
     796                //pWrite(tempRed->getPoly());
     797                //pWrite(tempRed->getTerm());
     798                //Print("TO BE REDUCED:     ");
     799                //pWrite(tempPoly);
     800                //Print("DIVISIBLE? %d\n",pDivisibleBy(tempRed->getPoly(),tempPoly));
     801                    if(pDivisibleBy(tempRed->getPoly(),tempPoly)) {
    761802                    u   =   pDivide(pHead(tempPoly),pHead(tempRed->getPoly()));
    762803                    pSetCoeff(u,nOne);
    763                     //poly red =   ppMult_qq(u,temp->getPoly());
    764                     //pNorm(red);
     804                    poly red =   ppMult_qq(u,tempRed->getPoly());
     805                    pNorm(red);
     806                    //pWrite(red);
    765807                    // check if both have the same label
    766                     if(pLmCmp(ppMult_qq(u,tempRed->getTerm()),tempMon->getTerm()) != 0) {
     808                    if(tempRed->getIndex() != l->getIndex()) {
     809                            // passing criterion1 ?
     810                            if(!criterion1(gPrev,u,tempRed,lTag)) {
     811                                    //Print("TO BE REDUCED:     ");
     812                                    //pWrite(tempPoly);
     813                                    //Print("REDUCER: ");
     814                                    pWrite(tempRed->getPoly());
     815                                    //pWrite(ppMult_qq(u,tempRed->getPoly()));
     816                                    //pWrite(ppMult_qq(u,tempRed->getTerm()));
     817                                    //Print("%d\n",tempRed->getIndex());
     818                                    //Print("+++++++++++++LIST OF MONOMIALS1+++++++++++++++++\n");
     819                                    poly tempRedPoly    =  pSub(ppMult_qq(u,tempRed->getPoly()),pHead(ppMult_qq(u,tempRed->getPoly())));
     820                                    pAdd(tempPoly,tempRedPoly);
     821                                    //Print("REDUCTION STEP: \n");
     822                                    //pWrite(l->getPoly());
     823                                    //l->setPoly(pSub(l->getPoly(),ppMult_qq(u,tempRed->getPoly())));
     824                                    //pNorm(tempRedPoly);
     825                                    //pWrite(l->getPoly());
     826                                    //monomials->insert(ppMult_qq(u,tempRed->getTerm()), tempRed->getIndex(), tempRedPoly,NULL);
     827                                    //Print("+++++++++++++LIST OF MONOMIALS2+++++++++++++++++\n");
     828                                    //monomials->print();
     829                                    good->insert(pOne(),1,ppMult_qq(u,tempRed->getPoly()),NULL);
     830                                    //Print("GOOD ELEMENTS: \n");
     831                                    //Print("%p\n",good->getFirst());
     832                                    //good->print();
     833                                    break;
     834                             }   
     835                   
     836                        }
     837                    else {
     838                    if(pLmCmp(ppMult_qq(u,tempRed->getTerm()),l->getTerm()) != 0) {
    767839                        // passing criterion2 ?
    768840                        if(!criterion2(gPrev->getFirst()->getIndex(), u,tempRed,rules,rTag)) {
    769841                            // passing criterion1 ?
    770842                            if(!criterion1(gPrev,u,tempRed,lTag)) {
    771                                 if(pLmCmp(ppMult_qq(u,tempRed->getTerm()),tempMon->getTerm()) == 1) {
    772     //Print("HIER1\n");
     843                                if(pLmCmp(ppMult_qq(u,tempRed->getTerm()),l->getTerm()) == 1) {
     844                                    //Print("BAD REDUCTION STUFF\n");
     845                                    //pWrite(tempRed->getPoly());
     846                                    //pWrite(ppMult_qq(u,tempRed->getTerm()));
     847                                    //rules->insert(tempRed->getIndex(),ppMult_qq(u,tempRed->getTerm()));
     848                                    //Print("\n\nRules:\n");
     849                                    //rules->print();
    773850                                    bad->insertSP(tempRed->getLPoly());
     851                                    //Print("HERE\n");
     852                                    //pWrite(tempRed->getPoly());
     853                                    //sleep(5);
    774854                                }
    775855                                else {
    776                                     monomials->insertSP(tempRed->getLPoly());
    777                                     good->insertSP(tempRed->getLPoly());
    778     //Print("HIER2\n");
     856                                    //Print("TO BE REDUCED:     ");
     857                                    //pWrite(tempPoly);
     858                                    //Print("REDUCER: ");
     859                                    //pWrite(tempRed->getPoly());
     860                                    //pWrite(ppMult_qq(u,tempRed->getPoly()));
     861                                    //pWrite(ppMult_qq(u,tempRed->getTerm()));
     862                                    //Print("%d\n",tempRed->getIndex());
     863                                    //Print("+++++++++++++LIST OF MONOMIALS1+++++++++++++++++\n");
     864                                    poly tempRedPoly    =  pSub(ppMult_qq(u,tempRed->getPoly()),pHead(ppMult_qq(u,tempRed->getPoly())));
     865                                    pAdd(tempPoly,tempRedPoly);
     866                                    //Print("REDUCTION STEP: \n");
     867                                    //pWrite(l->getPoly());
     868                                    //l->setPoly(pSub(l->getPoly(),ppMult_qq(u,tempRed->getPoly())));
     869                                    //pNorm(tempRedPoly);
     870                                    //pWrite(l->getPoly());
     871                                    //monomials->insert(ppMult_qq(u,tempRed->getTerm()), tempRed->getIndex(), tempRedPoly,NULL);
     872                                    //Print("+++++++++++++LIST OF MONOMIALS2+++++++++++++++++\n");
     873                                    //monomials->print();
     874                                    good->insert(pOne(),l->getIndex(),ppMult_qq(u,tempRed->getPoly()),NULL);
     875                                    //Print("GOOD ELEMENTS: \n");
     876                                    //Print("%p\n",good->getFirst());
     877                                    //good->print();
     878                                    break;
    779879                                }
    780880                            }   
     
    783883                    }
    784884                }
     885                   
     886                }
    785887                tempRed =   tempRed->getNext();
     888                //Print("HERE TOO\n");
     889                //pWrite(tempRed->getPoly());
    786890            }
    787891            pIter(tempPoly);
    788         }
     892            //Print("ITERATION:  ");
     893            //pWrite(tempPoly);
     894        }
     895       
    789896        tempMon =   tempMon->getNext();
    790     }
    791     // if there are reducers than reduce l
     897        //Print("NEXT ELEMENT TO BE REDUCED:   ");
     898        //if(NULL != tempMon) {
     899        //    pWrite(tempMon->getPoly());
     900        //}
     901        //else {
     902        //    Print("NICHTS MEHR DA\n");
     903        //}
     904    }
     905                // if there are reducers than reduce l
    792906    if(NULL != good->getFirst()) {
     907        //Print("HIER IN GOOD REDUCTION\n");
    793908        LNode* tempGood         =   good->getFirst();
    794909        ideal reductionId       =   idInit(good->getLength(),1);
    795910        int i;
     911        //Print("\n\n");
    796912        for(i=0;i<good->getLength();i++) {
    797913            reductionId->m[i]   =   tempGood->getPoly();
     914            //Print("REDUCERS:");
     915            //pWrite(tempGood->getPoly());
     916            //Print("%p\n",tempGood);
    798917            tempGood            =   tempGood->getNext();
    799918        }
     919        //idShow(reductionId);
     920        //reductionId =   idAdd(reductionId,gbPrev);
     921        //Print("\n\nREDUCTION PROCESS DONE TWICE!");
     922        //idDelMultiples(reductionId);
     923        //idShow(reductionId);
    800924        poly temp   =   kNF(reductionId,currQuotient,l->getPoly());
     925        //pWrite(temp);
     926        //poly temp2  =   kNF(reductionId,currQuotient,temp);
     927        //pWrite(temp2);
     928        //Print("\n\n");
    801929        if(NULL != temp) {
    802930            pNorm(temp);
    803             Print("NEW REDUCTION:  ");
    804             pWrite(temp);
     931            //Print("NEW REDUCTION:  ");
     932            //pWrite(temp);
    805933            l->setPoly(temp);
    806             pWrite(l->getPoly());
     934            //Print("ELEMENT ADDED TO GPREV: ");
     935            //pWrite(l->getPoly());
     936            //pWrite(l->getTerm());
     937            //Print("%p\n",gPrev->getLast());
     938            //pWrite(gPrev->getLast()->getPoly());
    807939            gPrev->insert(l->getLPoly());
    808             rules->print();
     940            //Print("%p\n",gPrev->getLast());
     941            //pWrite(gPrev->getLast()->getPoly());
     942            //rules->print();
    809943            criticalPair(gPrev,critPairs,lTag,rTag,rules);
     944            //Print("LIST OF CRITICAL PAIRS:    \n");
     945            //critPairs->print();
    810946        }
    811947        else {
     
    814950        }
    815951        //pWrite(temp);
    816         for(i=0;i<IDELEMS(reductionId);i++) {
    817             reductionId->m[i]    =   NULL;
    818         }
     952        //for(i=0;i<IDELEMS(reductionId);i++) {
     953        //}
     954        //idShow(reductionId);
     955        //Print("HIER\n");
     956        //Print("ADDRESS OF IDEAL: %p\n",&reductionId);
    819957        idDelete(&reductionId);
    820    
     958        //Print("HIER\n");
    821959    }
    822960    else {
    823961        //pWrite(l->getPoly());
    824962        gPrev->insert(l->getLPoly());
    825         Print("GENAU HIER:  ");
     963        //Print("ELEMENT ADDED TO GPREV: ");
     964        //pWrite(l->getPoly());
     965        //pWrite(l->getTerm());
     966        //Print("GENAU HIER:  ");
     967        //pWrite(l->getPoly());
     968        criticalPair(gPrev,critPairs,lTag,rTag,rules);
     969        //Print("LIST OF CRITICAL PAIRS:    \n");
     970        //critPairs->print();
     971    }
     972    // if there are "bad" reducers than try to compute new S-polynomials and rules
     973   /*
     974    if(NULL != bad->getFirst()) {
     975        Print("BAD STUFF LIST:\n");
     976        bad->print();
     977        LNode* tempBad  =   bad->getFirst();
    826978        pWrite(l->getPoly());
    827         criticalPair(gPrev,critPairs,lTag,rTag,rules);
    828     }
    829     // if there are "bad" reducers than try to compute new S-polynomials and rules
    830     if(NULL != bad->getFirst()) {
    831         LNode* tempBad  =   bad->getFirst();
    832979        while(NULL != tempBad) {
    833980            if(pDivisibleBy(tempBad->getPoly(),l->getPoly())) {
     981                Print("BAD STUFF\n");
     982                pWrite(l->getPoly());
     983                pWrite(tempBad->getPoly());
    834984                u   =   pDivide(pHead(l->getPoly()),pHead(tempBad->getPoly()));
     985                Print("MULTIPLIER:  ");
     986                pWrite(u);
    835987                pSetCoeff(u,nOne);
    836988                if(pLmCmp(ppMult_qq(u,tempBad->getTerm()),l->getTerm()) != 0) {
     
    843995                            poly temp   =   pSub(ppMult_qq(u,tempBad->getPoly()),l->getPoly());
    844996                            LNode* tempBadNew   =   new LNode(ppMult_qq(u,tempBad->getTerm()),tempBad->getIndex(),temp,rules->getFirst()->getRule());
     997                            pWrite(temp);
     998                            pWrite(tempBadNew->getPoly());
    845999                            //tempRed->getLPoly()->setRule(rules->getFirst()->getRule());
    8461000                            tempBadNew->setDel(1);
     
    8501004                }
    8511005            }
     1006        Print("HIER\n");
    8521007            tempBad =   tempBad->getNext();
    853         }
    854     }
     1008            Print("%p\n",tempBad);
     1009        }
     1010    }
     1011        Print("HIER AUCH\n");
     1012 
     1013*/
     1014
    8551015
    8561016}
     
    8891049                //poly temp           =   pMinus_mm_Mult_qq(tempRed->getPoly(),pOne,l->getPoly());
    8901050                poly temp   =   ksOldSpolyRedNew(l->getPoly(),tempRed->getPoly());
     1051                rules->insert(tempRed->getIndex(),tempRed->getTerm());
    8911052                //Print("NACHHER: ");
    8921053                //pWrite(tempRed->getPoly());
     
    8971058                    //tempRed->setPoly(temp);
    8981059                    //tempRed->setDel(1);
    899                     rules->insert(tempRed->getIndex(),tempRed->getTerm());
     1060                    //rules->insert(tempRed->getIndex(),tempRed->getTerm());
    9001061                    LNode* tempRedNew   =   new LNode(tempRed->getTerm(),tempRed->getIndex(),temp,rules->getFirst()->getRule());
    9011062                    //tempRed->getLPoly()->setRule(rules->getFirst()->getRule());
     
    9181079                //temp_poly_l         =   pCopy(l->getPoly());
    9191080                //poly temp   =   pMinus_mm_Mult_qq(tempRed->getPoly(),pOne,l->getPoly());
     1081                //Print("REDUCER: ");
     1082                //pWrite(tempRed->getPoly());
     1083                //pWrite(tempRed->getTerm());
    9201084                poly temp   =   ksOldSpolyRedNew(l->getPoly(),tempRed->getPoly());
     1085                //Print("REDUCED ELEMENT:  ");
    9211086                if(NULL != temp) {
    9221087                    pNorm(temp);
     1088                    //pWrite(temp);
    9231089                    poly tempNF =   kNF(gbPrev,currQuotient,temp); 
    9241090                    pNorm(tempNF);
     
    9441110            if(NULL != l->getPoly()) {
    9451111                pNorm(l->getPoly());
     1112                //Print("ELEMENT ADDED TO GPREV: ");
     1113                //pWrite(l->getPoly());
    9461114                gPrev->insert(l->getLPoly());
    947                 Print("TEMP RED == 0  ");
    948                 pWrite(l->getPoly());
    949                 pWrite(l->getTerm());
    950                 rules->print();
     1115                //Print("TEMP RED == 0  ");
     1116                //pWrite(l->getPoly());
     1117                //pWrite(l->getTerm());
     1118                //rules->print();
    9511119                criticalPair(gPrev,critPairs,lTag,rTag,rules);
     1120                //Print("LIST OF CRITICAL PAIRS:    \n");
     1121                //critPairs->print();
    9521122            }
    9531123            break;
     
    10501220    // DEBUGGING STUFF START
    10511221    //Print("NUMBER: %d\n",r->N);
    1052    
     1222    /*
    10531223    int* ev = new int[r->N +1];
    10541224    for(i=0;i<IDELEMS(id);i++) {
     
    10621232    }
    10631233    delete ev;
    1064    
     1234    */
    10651235    /*DEBUGGING STUFF END */
    10661236   
     
    10851255    id              =   idNew;
    10861256    //qsortDegree(&id->m[0],&id->m[IDELEMS(id)-1]);
    1087     idShow(id);
     1257    //idShow(id);
    10881258    LList* gPrev    =   new LList(ONE, i, id->m[0]);
    10891259    //idShow(id);
     
    11321302                        //}
    11331303                }
    1134                 if(counter != gPrev->count(gPrevTag->getNext())) {
    1135                     Print("----------------------------------WRONG COUNTING---------------------------\n");
    1136                 }
    11371304                    gbPrev          =   idAdd(gbPrev,gbAdd);
    11381305                    //idShow(gbPrev);
     
    11511318                //int timer2  =   initTimer();
    11521319                //startTimer();
     1320                //idShow(gbPrev);
    11531321                ideal tempId    =   kInterRed(gbPrev);
    1154                
     1322                //idShow(kInterRed(gbPrev));
    11551323                //idShow(tempId);
    11561324                gbPrev          =   tempId;
     
    12031371            }
    12041372            gbLength    =   gPrev->getLength();
    1205             //Print("HIER\n");
    1206         }
     1373            /*
     1374            if(gPrev->getLength() == 4) {
     1375                poly temp1  =   pInit();
     1376                poly temp2  =   pInit();
     1377                poly u      =   pInit();
     1378                temp1       =   pCopy(gbPrev->m[3]);
     1379                temp2       =   pCopy(gbPrev->m[2]);
     1380                u           =   pCopy(gbPrev->m[0]);
     1381                pIter(u);
     1382                pIter(u);
     1383                pIter(u);
     1384                pIter(u);
     1385                //pWrite(u);
     1386                number n    =   nInit(3);
     1387                pSetCoeff(u,n);
     1388                poly tempNew        =   pAdd(temp1,pMult(u,temp2));
     1389                gbPrev->m[3]        =   tempNew;
     1390                LNode* tempNode4    =   gPrev->getFirst();
     1391                tempNode4           =   tempNode4->getNext()->getNext()->getNext();
     1392                tempNode4->setPoly(tempNew);
     1393                //Print("HIER\n");
     1394            }
     1395            */
    12071396        //gPrev->print();
    12081397        //int anzahl  =   1;
     
    12191408        //Print("===================================================\n");
    12201409        //Print("JA\n");
    1221         Print("LENGTH OF GPREV: %d\n",gPrev->getLength());
     1410        //Print("LENGTH OF GPREV: %d\n",gPrev->getLength());
     1411        //idShow(gbPrev);
    12221412    }
    12231413        //idShow(gbPrev);
     1414    }
    12241415    Print("\n\nNumber of zero-reductions:  %d\n",reductionsToZero);
    12251416    timer   =   getTimer();
     
    12351426    delete rTag;
    12361427    delete gPrev;
    1237     reductionTime   =   0;
    1238     spolsTime       =   0;
     1428    reductionsToZero    =   0;
     1429    highestDegree       =   0;
     1430    reductionTime       =   0;
     1431    spolsTime           =   0;
    12391432    return(gbPrev);
    12401433
Note: See TracChangeset for help on using the changeset viewer.