Changeset a9c298 in git for kernel/f5lists.cc


Ignore:
Timestamp:
Nov 20, 2013, 4:54:25 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
0de0509972719531e2a4b51ec9fd0e44a66fd2fd
Parents:
e4014563a82388c4b39dfa37db24cbe159b24a35
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-11-20 16:54:25+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-11-20 16:54:42+01:00
Message:
format stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/f5lists.cc

    re40145 ra9c298  
    3939PNode* PNode::insert(poly p) {
    4040  poly q = pOne();
    41   q = pCopy(p); 
     41  q = pCopy(p);
    4242  PNode* temp = this;
    4343  if(NULL == temp) {
     
    8383  first = first->insert(p);
    8484}
    85  
     85
    8686
    8787/*
     
    137137    next                =   NULL;
    138138}
    139        
     139
    140140LNode::LNode(LPolyOld* lp, LNode* l) {
    141141//Print("HIER LNODE\n");
     
    149149next                =   NULL;
    150150}
    151        
     151
    152152LNode::LNode(poly t, int i, poly p, RuleOld* r, LNode* l) {
    153153    LPolyOld* lp           =   new LPolyOld(t,i,p,r);
     
    160160    next                =   ln->getNext();
    161161}
    162        
     162
    163163LNode::~LNode() {
    164164    //delete next;
    165165    //Print("DELETE LNODE\n");
    166     delete data;   
     166    delete data;
    167167}
    168168
     
    191191    }
    192192}
    193        
     193
    194194inline LNode* LNode::insert(poly t, int i, poly p, RuleOld* r) {
    195195    if(NULL == this) {
     
    212212    return newElement;
    213213}
    214        
     214
    215215inline LNode* LNode::insertSP(poly t, int i, poly p, RuleOld* r) {
    216216    LNode* newElement   =   new LNode(t, i, p, r, this);
     
    253253                    //Print("%p\n",temp);
    254254                    //Print("%p\n",temp->data);
    255                    
     255
    256256                    //Print("%p\n",temp->next);
    257257                }
     
    302302                    //Print("%p\n",temp);
    303303                    //Print("%p\n",temp->data);
    304                    
     304
    305305                    //Print("%p\n",temp->next);
    306306                }
     
    443443    last    =   first;
    444444    length  =   1;
    445 } 
     445}
    446446
    447447LList::~LList() {
     
    558558    next = NULL;
    559559}
    560        
     560
    561561LTagNode::LTagNode(LNode* l, LTagNode* n) {
    562562    data = l;
     
    565565
    566566 LTagNode::~LTagNode() {
    567     delete data;   
    568 }
    569        
     567    delete data;
     568}
     569
    570570// declaration with first as parameter due to sorting of LTagList
    571571LTagNode* LTagNode::insert(LNode* l) {
     
    607607LTagList::LTagList() {
    608608    LTagNode* first =   new LTagNode();
    609    
     609
    610610    length          =   0;
    611611}
     
    679679
    680680CNode::CNode() {
    681     data    =   NULL;   
    682     next    =   NULL;   
     681    data    =   NULL;
     682    next    =   NULL;
    683683}
    684684
    685685CNode::CNode(CPairOld* c) {
    686     data    =   c;   
    687     next    =   NULL;   
     686    data    =   c;
     687    next    =   NULL;
    688688}
    689689
    690690CNode::CNode(CPairOld* c, CNode* n) {
    691     data    =   c;   
    692     next    =   n;   
     691    data    =   c;
     692    next    =   n;
    693693}
    694694
     
    699699// insert sorts the critical pairs firstly by increasing total degree, secondly by increasing label
    700700// note: as all critical pairs have the same index here, the second sort is done on the terms of the labels
    701 // working only with linked, but not doubly linked lists due to memory usage we have to check the 
     701// working only with linked, but not doubly linked lists due to memory usage we have to check the
    702702// insertion around the first element separately from the insertion around all other elements in the list
    703703CNode* CNode::insert(CPairOld* c) {
     
    724724                CNode* temp = this;
    725725                while(  NULL != temp->next) {
    726                     if(temp->next->data->getDeg() == c->getDeg() ) { 
     726                    if(temp->next->data->getDeg() == c->getDeg() ) {
    727727                        if(1 == pLmCmp(u1,ppMult_qq(temp->next->data->getT1(),temp->next->data->getLp1Term()))) {
    728728                            temp = temp->next;
     
    732732                            temp->next          =   newElement;
    733733                            return this;
    734                         } 
     734                        }
    735735                    }
    736736                    else {
     
    747747        if( c->getDeg() > this->data->getDeg() ) { // greater degree than the first list element
    748748            CNode* temp =   this;
    749             while( NULL != temp->next ) {   
     749            while( NULL != temp->next ) {
    750750                if( c->getDeg() < temp->next->data->getDeg() ) {
    751751                    CNode* newElement   =   new CNode(c, temp->next);
     
    754754                }
    755755                if( c->getDeg() == temp->next->data->getDeg() ) {
    756                     if(1 != pLmCmp(u1,ppMult_qq(temp->next->data->getT1(),temp->next->data->getLp1Term()))) { 
     756                    if(1 != pLmCmp(u1,ppMult_qq(temp->next->data->getT1(),temp->next->data->getLp1Term()))) {
    757757                        CNode* newElement   =   new CNode(c, temp->next);
    758758                        temp->next          =   newElement;
     
    762762                        temp = temp->next;
    763763                        while(  NULL != temp->next ) {
    764                             if( temp->next->data->getDeg() == c->getDeg() ) { 
     764                            if( temp->next->data->getDeg() == c->getDeg() ) {
    765765                                if(1 == pLmCmp(u1,ppMult_qq(temp->next->data->getT1(),
    766766                                               temp->next->data->getLp1Term()))) {
     
    771771                                    temp->next          =   newElement;
    772772                                    return this;
    773                                 } 
     773                                }
    774774                            }
    775775                            else {
     
    810810            temp = temp->next;
    811811        }
    812         CNode* returnCNode  =   temp->next;   
    813         // every CListOld should end with a (NULL,NULL) element for a similar behaviour 
     812        CNode* returnCNode  =   temp->next;
     813        // every CListOld should end with a (NULL,NULL) element for a similar behaviour
    814814        // using termination conditions throughout the algorithm
    815815        temp->next          =   NULL;
     
    10001000
    10011001RNode* RNode::insertOrdered(RuleOld* r) {
    1002     RNode* newElement   =   new RNode(r); 
     1002    RNode* newElement   =   new RNode(r);
    10031003    RNode* temp         =   this;
    10041004    if(NULL == temp) {
     
    10221022RNode* RNode::getNext() {
    10231023    return next;
    1024 }   
     1024}
    10251025
    10261026RuleOld* RNode::getRuleOld() {
     
    10741074    }
    10751075    //Print("FERTIG\n");
    1076 } 
     1076}
    10771077
    10781078void RList::insert(int i, poly t) {
     
    11101110    next = NULL;
    11111111}
    1112  
     1112
    11131113RTagNode::RTagNode(RNode* r) {
    11141114    data = r;
    11151115    next = NULL;
    11161116}
    1117        
     1117
    11181118RTagNode::RTagNode(RNode* r, RTagNode* n) {
    1119    
     1119
    11201120    data = r;
    11211121    next = n;
     
    11231123
    11241124RTagNode::~RTagNode() {
    1125     delete data;   
    1126 }
    1127        
     1125    delete data;
     1126}
     1127
    11281128// declaration with first as parameter due to sorting of RTagList
    11291129RTagNode* RTagNode::insert(RNode* r) {
     
    11561156    else {
    11571157        int j;
    1158         RTagNode* temp = this; 
     1158        RTagNode* temp = this;
    11591159    //Print("\n\nHIER IN GET IDX\n");
    1160     //Print("FOR LOOP: %d\n",length-idx+1);   
     1160    //Print("FOR LOOP: %d\n",length-idx+1);
    11611161    for(j=1; j<=length-idx+1; j++) {
    11621162            temp = temp->next;
Note: See TracChangeset for help on using the changeset viewer.