Changeset f6c7c9b in git


Ignore:
Timestamp:
Mar 18, 2009, 2:39:13 PM (14 years ago)
Author:
Christian Eder
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
d92713daaf53064c41302f5ac677aa51908ff3c9
Parents:
810a4af4676af92fb8445bdc35075ece1f8751dd
Message:
deleted criterion2-tests if the element does not have the current index


git-svn-id: file:///usr/local/Singular/svn/trunk@11570 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/f5gb.cc

    r810a4af rf6c7c9b  
    155155    delete critPairs;
    156156    //Print("IN F5INC\n");
    157    Print("\n\n\nRULES: \n");
     157    /*
     158    Print("\n\n\nRULES: \n");
    158159        RNode* tempR    =   rules->getFirst();
    159160        Print("%p\n",tempR);
     
    168169            t++;
    169170        }
    170  
     171    */
    171172    //gPrev->print();
    172173    return gPrev;
     
    231232        // testing both new labels by the F5 Criterion
    232233        //critPairs->print();
    233         if(!criterion2(u1, newElement, rules, rTag) && !criterion2(u2, temp, rules, rTag) &&
     234        if(!criterion2(gPrev->getFirst()->getIndex(), u1, newElement, rules, rTag)
     235           && !criterion2(gPrev->getFirst()->getIndex(), u2, temp, rules, rTag) &&
    234236           !criterion1(gPrev,u1,newElement,lTag) && !criterion1(gPrev,u2,temp,lTag)) {
    235237            // if they pass the test, add them to CList critPairs, having the LPoly with greater
     
    322324        idDelete(&testId);
    323325        if(NULL == temp) {
     326            //if(l->getIndex() != gPrev->getFirst()->getIndex()) {
     327            //    Print("----------------------------Criterion1 not passed----------------------------------\n");
     328            //}
    324329            return true;
    325330        }
     
    335340=====================================
    336341*/
    337 inline bool criterion2(poly t, LNode* l, RList* rules, RTagList* rTag) {
     342inline bool criterion2(int idx, poly t, LNode* l, RList* rules, RTagList* rTag) {
    338343    //Print("------------------------------IN CRITERION 2/1-----------------------------------------\n");
    339344    /* 
     
    358363      */
    359364// start at the previously added element to gPrev, as all other elements will have the same index for sure
     365    if(idx > l->getIndex()) {
     366        return false;
     367    }
     368   
    360369    RNode* testNode; // =   new RNode();
    361      
     370   
     371
    362372    if(NULL == rTag->getFirst()) {
    363373        if(NULL != rules->getFirst()) {
     
    419429        //Print("%d\n",testNode->getRuleIndex());
    420430        if(pLmDivisibleByNoComp(testNode->getRuleTerm(),u1)) {
    421             //Print("Criterion 2 NOT passed!\n");
     431            //Print("-----------------Criterion 2 NOT passed!-----------------------------------\n");
     432            //Print("INDEX: %d\n",l->getIndex());
    422433            pDelete(&u1);
    423434    //Print("------------------------------IN CRITERION 2/1-----------------------------------------\n\n");
     
    464475        //pWrite(testNode->getRuleTerm());
    465476        if(pLmDivisibleByNoComp(testNode->getRuleTerm(),u1)) {
    466             //Print("Criterion 2 NOT passed!\n");
     477            //Print("--------------------------Criterion 2 NOT passed!------------------------------\n");
     478            //Print("INDEX: %d\n",l->getIndex());
    467479            pDelete(&u1);
    468480    //Print("------------------------------IN CRITERION 2/2-----------------------------------------\n\n");
     
    841853        //Print("HALLO\n");
    842854                // passing criterion2 ?
    843                 if(!criterion2(u,temp,rules,rTag)) {
     855                if(!criterion2(gPrev->getFirst()->getIndex(), u,temp,rules,rTag)) {
    844856                    // passing criterion1 ?
    845857                    if(!criterion1(gPrev,u,temp,lTag)) {
     
    887899    // this must be done due to possible later improvements
    888900    RList* rules    =   new RList();
    889     Print("RULES FIRST: %p\n",rules->getFirst());
     901    //Print("RULES FIRST: %p\n",rules->getFirst());
    890902    //Print("RULES FIRST DATA: %p\n",rules->getFirst()->getRule());
    891903    RTagList* rTag  =   new RTagList(rules->getFirst());
     
    975987                gPrev->insert(pOne,1,gbPrev->m[1]);
    976988                poly tempPoly = pInit();
     989                pLcm(pHead(gbPrev->m[0]),pHead(gbPrev->m[1]),tempPoly);
     990                tempPoly    =   pDivide(tempPoly,pOne());
    977991                pSetCoeff(tempPoly,nOne);
    978                 pLcm(pHead(gbPrev->m[0]),pHead(gbPrev->m[1]),tempPoly);
    979992                rules    =   new RList();
    980993                rTag     =   new RTagList(rules->getFirst());
    981994               
    982995                //Print("%p\n",rules->getFirst());
    983                 pWrite(tempPoly);
     996                //pWrite(tempPoly);
    984997                rules->insert(2,tempPoly);
    985998                rTag->insert(rules->getFirst());
     
    9981011                        poly tempPoly2  =   pOne();
    9991012                        pLcm(pHead(gbPrev->m[k]),pHead(gbPrev->m[l]),tempPoly2);
     1013                        tempPoly2   =   pDivide(tempPoly2,pOne());
    10001014                        pSetCoeff(tempPoly2,nOne);
    1001                         pWrite(tempPoly2);
     1015                        //pWrite(tempPoly2);
    10021016                        rules->insert(k+1,tempPoly2);
    10031017                    }
  • kernel/f5gb.h

    r810a4af rf6c7c9b  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: f5gb.h,v 1.32 2009-03-04 20:23:04 ederc Exp $ */
     4/* $Id: f5gb.h,v 1.33 2009-03-18 13:39:13 ederc Exp $ */
    55/*
    66* ABSTRACT: f5gb interface
     
    5858=====================================
    5959*/
    60 inline bool criterion2(poly t, LNode* l, RList* rules, RTagList* rTag);
     60inline bool criterion2(int idx, poly t, LNode* l, RList* rules, RTagList* rTag);
    6161
    6262/*
  • kernel/f5lists.cc

    r810a4af rf6c7c9b  
    764764    //Print("ADDRESS OF RNODE: %p\n",newElement);
    765765    //Print("ADDRESS OF RNODE DATA: %p\n",newElement->getRule());
     766    newElement->next    =   this;
     767    return newElement;
     768   
     769    /*
     770     * not useful, as it does not only adds new rules to be tested but also
     771     * deletes rules to be tested if a rule is set to another place in the line
     772     *
    766773    if(NULL == this || this->getRuleIndex() < newElement->getRuleIndex()) {
    767774        newElement->next    =   this;
     
    793800    }
    794801    return newElement;
     802    */
    795803}
    796804
Note: See TracChangeset for help on using the changeset viewer.