Changeset 7c81165 in git for kernel/f5gb.cc


Ignore:
Timestamp:
Mar 12, 2009, 10:43:53 AM (15 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
75e2e50e5ba0dbb6681ecbf8664330997a24b5e9
Parents:
47ca23dae2b0131537f61842055e75beb7836f77
Message:
updated list of critical pairs, thrown away some useless data


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

Legend:

Unmodified
Added
Removed
  • kernel/f5gb.cc

    r47ca23 r7c81165  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: f5gb.cc,v 1.42 2009-03-09 14:51:42 ederc Exp $ */
     4/* $Id: f5gb.cc,v 1.43 2009-03-12 09:43:53 ederc Exp $ */
    55/*
    66* ABSTRACT: f5gb interface
     
    9696    static LList* reducedLPolys     =   new LList();
    9797    // while there are critical pairs to be further checked and deleted/computed
    98     while(NULL != critPairs->getFirst()->getData()) {
     98    while(NULL != critPairs->getFirst()) {
    9999        // critPairs->getMinDeg() deletes the first elements of minimal degree from
    100100        // critPairs, thus the while loop is not infinite.
     
    105105        // added
    106106        computeSPols(critPairsMinDeg,rTag,rules,sPolyList);
    107        
     107        //Print("HIER2\n");
    108108        // DEBUG STUFF FOR SPOLYLIST
    109109        LNode* temp     =   sPolyList->getFirst();
     
    180180    Rule* testedRule    =   rules->getFirst()->getRule();
    181181    // computation of critical pairs
     182    //critPairs->print();
    182183    while( gPrev->getLast() != temp) {
    183184        //pWrite( *(gPrev->getFirst()->getPoly()) );
     
    206207            -1 == pLmCmp(ppMult_qq(u1, newElement->getTerm()),ppMult_qq(u2, temp->getTerm()))) {
    207208                //Print("zweites groesser\n");
     209               
    208210                CPair* cp   =   new CPair(pDeg(ppMult_qq(u2,pHead(temp->getPoly()))), u2,
    209211                                temp->getLPoly(), u1, newElement->getLPoly(), testedRule);                   
    210212                critPairs->insert(cp);
     213                //Print("LALA %p\n",critPairs->getFirst());
     214                //sleep(5);
    211215            }
    212216            else {
    213                 //Print("erstes groesser\n");
    214217                CPair* cp   =   new CPair(pDeg(ppMult_qq(u2,pHead(temp->getPoly()))), u1,
    215218                                newElement->getLPoly(), u2, temp->getLPoly(), testedRule);                   
     219                //Print("erstes groesser\n");
    216220                critPairs->insert(cp);
     221                //Print("LALA %p\n",critPairs->getFirst());
     222                //sleep(5);
    217223            }
    218224        }
     
    228234        //sleep(5);
    229235    //}
     236    //Print("END CRITPAIRS\n");
    230237}
    231238
     
    280287inline bool criterion2(poly t, LNode* l, RList* rules, RTagList* rTag) {
    281288    //Print("------------------------------IN CRITERION 2/1-----------------------------------------\n");
    282         //Print("RULES: \n");
    283         //RNode* tempR    =   rules->getFirst();
    284         //while(NULL != tempR->getRule()) {
    285             //Print("ADDRESS OF RNODE: %p\n",tempR);
    286             //Print("ADDRESS OF RULE: %p\n",tempR->getRule());
    287             //pWrite(tempR->getRuleTerm());
    288             //Print("ADDRESS OF TERM: %p\n",tempR->getRuleTerm());
    289             //Print("%d\n\n",tempR->getRuleIndex());
    290             //tempR   =   tempR->getNext();
    291         //}
     289    /*   
     290    Print("RULES: \n");
     291        RNode* tempR    =   rules->getFirst();
     292        int i   = 1;
     293        while(NULL != tempR->getRule()) {
     294            Print("ADDRESS OF %d RNODE: %p\n",i,tempR);
     295            Print("ADDRESS OF RULE: %p\n",tempR->getRule());
     296            pWrite(tempR->getRuleTerm());
     297            Print("ADDRESS OF TERM: %p\n",tempR->getRuleTerm());
     298            Print("%d\n\n",tempR->getRuleIndex());
     299            tempR   =   tempR->getNext();
     300            i++;
     301        }
     302       
    292303        //Print("TESTED ELEMENT: ");
    293304        //pWrite(l->getPoly());
     
    295306        //pWrite(ppMult_qq(t,l->getTerm()));
    296307        //Print("%d\n\n",l->getIndex());
     308        */
    297309// start at the previously added element to gPrev, as all other elements will have the same index for sure
    298310    RNode* testNode =   new RNode();
     
    376388    //Print("LAST RULE TESTED: %p",testedRule);
    377389    //Print("RULES: \n");
    378         RNode* tempR    =   rules->getFirst();
     390        //RNode* tempR    =   rules->getFirst();
    379391        //while(NULL != tempR->getRule()) {
    380392            //pWrite(tempR->getRuleTerm());
     
    418430    poly sp      =   pInit();
    419431    //Print("###############################IN SPOLS##############################\n");
    420     while(NULL != temp->getData()) {
     432    //first->print();
     433
     434    while(NULL != temp) {
     435        //Print("JA\n");
    421436        // only if a new rule was added since the last test in subalgorithm criticalPair()
    422437        //if(rules->getFirst() != rTag->getFirst()) {
    423             if(!criterion2(temp->getT1(),temp->getAdLp1(),rules,temp->getTestedRule())) {
     438        if(!criterion2(temp->getT1(),temp->getAdLp1(),rules,temp->getTestedRule())) {
    424439                // the second component is tested only when it has the actual index, otherwise there is
    425440                // no new rule to test since the last test in subalgorithm criticalPair()
     
    495510            }
    496511        //}
     512        //Print("%p\n",temp);
    497513        temp    =   temp->getNext();
     514        //Print("%p\n",temp);
     515        //Print("%p\n",temp->getData());
     516        //pWrite(temp->getLp1Poly());
    498517    }
    499518    // these critical pairs can be deleted now as they are either useless for further computations or
     
    854873        //pWrite(gPrevTag->getPoly());
    855874        gPrev   =   F5inc(i, id->m[i-1], gPrev, gbPrev, ONE, lTag, rules, rTag);
     875        //Print("____________________________________ITERATION STEP DONE________________________________________\n");
    856876       
    857877        // DEBUGGING STUFF
Note: See TracChangeset for help on using the changeset viewer.