Changeset 35d0d1a in git


Ignore:
Timestamp:
Feb 9, 2009, 3:24:08 PM (14 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
2c6535a8648691161a07a546e5c73a0b41b9ac06
Parents:
fcb80223d452f79f3b3e1a62b71d291a5fc64943
Message:
*** empty log message ***


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

Legend:

Unmodified
Added
Removed
  • kernel/f5gb.cc

    rfcb8022 r35d0d1a  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: f5gb.cc,v 1.24 2009-02-08 19:17:54 ederc Exp $ */
     4/* $Id: f5gb.cc,v 1.25 2009-02-09 14:24:08 ederc Exp $ */
    55/*
    66* ABSTRACT: f5gb interface
     
    2626
    2727int reductionsToZero   =  0;
    28 //*reductionsToZero       =   0;
    2928
    3029/*
     
    180179bool criterion1(poly* t, LNode* l, LTagList* lTag) {
    181180    // starts at the first element in gPrev with index = (index of l)-1, these tags are saved in lTag
    182     LNode* testNode =   lTag->get(l->getIndex());
    183     // save the monom t1*label_term(l) as it is tested various times in the following
     181        LNode* testNode =   lTag->get(l->getIndex());
     182        // save the monom t1*label_term(l) as it is tested various times in the following
    184183    poly u1 = ppMult_qq(*t,l->getTerm());
    185184    while(NULL != testNode) {
     
    188187            return true;
    189188        }
    190         testNode    =   testNode->getNext();
    191     }
     189        //pWrite(testNode->getNext()->getPoly());
     190                testNode    =   testNode->getNext();
     191    }
     192    Print("HIER DRIN CRITERION 1\n");
     193       
    192194    return false;
    193195}
     
    201203*/
    202204bool criterion2(poly* t, LNode* l, RTagList* rTag) {
     205        Print("HIER DRIN CRITERION 2:=========================\n");
    203206    // start at the previously added element to gPrev, as all other elements will have the same index for sure
    204     RNode* testNode =   rTag->get(l->getIndex());
    205     // save the monom t1*label_term(l) as it is tested various times in the following
     207        RNode* testNode =   rTag->get(l->getIndex());
     208    Print("ADDRESS TEST NODE: %p\n", testNode);
     209        // save the monom t1*label_term(l) as it is tested various times in the following
    206210    poly u1 = ppMult_qq(*t,l->getTerm());
     211        Print("Poly u1: ");
     212        pWrite(u1);
    207213    // first element added to rTag was NULL, check for this
    208     while(NULL != testNode && testNode->getRule()->getOrigin() != l->getLPoly()) {
    209         if(pLmDivisibleByNoComp(ppMult_qq(*t,l->getTerm()),testNode->getRuleTerm())) {
     214    while(NULL != testNode && NULL != testNode->getRule() && testNode->getRule()->getOrigin() != l->getLPoly()) {
     215        Print("----------------------------------------------------------------------------------------------------------------------------------------------------\n");
     216                pWrite(ppMult_qq(*t,l->getTerm()));
     217                pWrite(testNode->getRuleTerm());
     218                if(pLmDivisibleBy(ppMult_qq(*t,l->getTerm()),testNode->getRuleTerm())) {
    210219            Print("Criterion 2 NOT passed!\n");
    211220            return true;
    212221        }
    213         testNode    =   testNode->getNext();
     222    Print("HIER AUCH DRIN?\n");
     223                Print("TEST NODE ADDRESS: %p\n",testNode->getNext());
     224                Print("TEST NODE LPOLY ADDRESS: %p\n",testNode->getNext()->getRule());
     225                testNode    =   testNode->getNext();
    214226    }
    215227    return false;
     
    225237bool criterion2(poly* t, LPoly* l, RTagList* rTag, Rule* lastRuleTested) {
    226238    // start at the previously added element to gPrev, as all other elements will have the same index for sure
    227     RNode* testNode =   rTag->getFirst();
     239        RNode* testNode =   rTag->getFirst();
    228240    // save the monom t1*label_term(l) as it is tested various times in the following
    229241    poly u1 = ppMult_qq(*t,l->getTerm());
    230     // first element added to rTag was NULL, check for this
    231     while(NULL != testNode && testNode->getRule() != lastRuleTested) {
    232         if(pLmDivisibleByNoComp(ppMult_qq(*t,l->getTerm()),testNode->getRuleTerm())) {
     242        // first element added to rTag was NULL, check for this
     243        while(NULL != testNode && NULL != testNode->getRule() && testNode->getRule() != lastRuleTested) {
     244        if(pLmDivisibleBy(testNode->getRuleTerm(),ppMult_qq(*t,l->getTerm()))) {
    233245            Print("Criterion 2 NOT passed!\n");
    234246            return true;
    235247        }
    236         testNode    =   testNode->getNext();
     248                testNode    =   testNode->getNext();
    237249    }
    238250    return false;
     
    272284                            // will never be used again as it is zero => no problems with
    273285                            // further criterion2() tests and termination conditions
    274                             reductionsToZero++;
     286                            Print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ZERO REDUCTION~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
     287                                                        reductionsToZero++;
    275288                            rules->insert(temp->getLp1Index(),temp->getT1(),NULL);
    276289                            rTag->setFirst(rules->getFirst());
     
    298311                        // will never be used again as it is zero => no problems with
    299312                        // further criterion2() tests and termination conditions
     313                            Print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ZERO REDUCTION~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
    300314                        reductionsToZero++;
    301315                        rules->insert(temp->getLp1Index(),temp->getT1(),NULL);
     
    346360            if(0 == pLmCmp(temp->getPoly(),zero)) {
    347361            Print("HIER\n");
     362                            Print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ZERO REDUCTION~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
    348363                reductionsToZero++;
    349364                // TODO: sPolyList -> delete first element of list as it is zero and done
Note: See TracChangeset for help on using the changeset viewer.