Changeset a05c71 in git for kernel/f5lists.cc
 Timestamp:
 Aug 31, 2009, 3:55:46 PM (14 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 fb1212fa95dcc1179dddfd72a79683e1282d5662
 Parents:
 f414c0965b52eb8faa2ff8c9afef799657e50a29
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/f5lists.cc
rf414c0 ra05c71 30 30 next = NULL; 31 31 } 32 LNode::LNode(LPoly * lp) {32 LNode::LNode(LPolyOld* lp) { 33 33 data = lp; 34 34 next = NULL; 35 35 } 36 36 37 LNode::LNode(LPoly * lp, LNode* l) {37 LNode::LNode(LPolyOld* lp, LNode* l) { 38 38 //Print("HIER LNODE\n"); 39 39 data = lp; … … 41 41 } 42 42 43 LNode::LNode(poly t, int i, poly p, Rule * r) {44 LPoly * lp = new LPoly(t,i,p,r);43 LNode::LNode(poly t, int i, poly p, RuleOld* r) { 44 LPolyOld* lp = new LPolyOld(t,i,p,r); 45 45 data = lp; 46 46 next = NULL; 47 47 } 48 48 49 LNode::LNode(poly t, int i, poly p, Rule * r, LNode* l) {50 LPoly * lp = new LPoly(t,i,p,r);49 LNode::LNode(poly t, int i, poly p, RuleOld* r, LNode* l) { 50 LPolyOld* lp = new LPolyOld(t,i,p,r); 51 51 data = lp; 52 52 next = l; … … 54 54 55 55 LNode::LNode(LNode* ln) { 56 data = ln>getLPoly ();56 data = ln>getLPolyOld(); 57 57 next = ln>getNext(); 58 58 } … … 75 75 // insert new elements to the list always at the end (labeled / classical polynomial view) 76 76 // needed for list gPrev 77 inline LNode* LNode::insert(LPoly * lp) {77 inline LNode* LNode::insert(LPolyOld* lp) { 78 78 //Print("LAST GPREV: "); 79 79 //pWrite(this>getPoly()); … … 89 89 } 90 90 91 inline LNode* LNode::insert(poly t, int i, poly p, Rule * r) {91 inline LNode* LNode::insert(poly t, int i, poly p, RuleOld* r) { 92 92 if(NULL == this) { 93 93 LNode* newElement = new LNode(t,i,p,r,this); … … 103 103 // insert new elements to the list always in front (labeled / classical polynomial view) 104 104 // needed for sPolyList 105 inline LNode* LNode::insertSP(LPoly * lp) {105 inline LNode* LNode::insertSP(LPolyOld* lp) { 106 106 LNode* newElement = new LNode(lp, this); 107 107 //Print("INSERTED IN SPOLYLIST: "); … … 110 110 } 111 111 112 inline LNode* LNode::insertSP(poly t, int i, poly p, Rule * r) {112 inline LNode* LNode::insertSP(poly t, int i, poly p, RuleOld* r) { 113 113 LNode* newElement = new LNode(t, i, p, r, this); 114 114 //Print("INSERTED IN SPOLYLIST: "); … … 118 118 // insert new elemets to the list w.r.t. increasing labels 119 119 // only used for the Spolys to be reduced (TopReduction building new Spolys with higher label) 120 inline LNode* LNode::insertByLabel(poly t, int i, poly p, Rule * r) {120 inline LNode* LNode::insertByLabel(poly t, int i, poly p, RuleOld* r) { 121 121 //Print("ADDING SOLYS TO THE LIST\n"); 122 122 //Print("new element: "); … … 222 222 } 223 223 224 // get the LPoly * out of LNode*225 LPoly * LNode::getLPoly() {224 // get the LPolyOld* out of LNode* 225 LPolyOld* LNode::getLPolyOld() { 226 226 return data; 227 227 } 228 228 229 // get the data from the LPoly saved in LNode229 // get the data from the LPolyOld saved in LNode 230 230 poly LNode::getPoly() { 231 231 return data>getPoly(); … … 240 240 } 241 241 242 Rule * LNode::getRule() {243 return data>getRule ();244 } 245 246 void LNode::setRule (Rule* r) {247 return data>setRule (r);242 RuleOld* LNode::getRuleOld() { 243 return data>getRuleOld(); 244 } 245 246 void LNode::setRuleOld(RuleOld* r) { 247 return data>setRuleOld(r); 248 248 } 249 249 … … 252 252 } 253 253 254 // set the data from the LPoly saved in LNode254 // set the data from the LPolyOld saved in LNode 255 255 void LNode::setPoly(poly p) { 256 256 data>setPoly(p); … … 333 333 } 334 334 335 LList::LList(LPoly * lp) {335 LList::LList(LPolyOld* lp) { 336 336 first = new LNode(lp); 337 337 last = first; … … 339 339 } 340 340 341 LList::LList(poly t,int i,poly p,Rule * r) {341 LList::LList(poly t,int i,poly p,RuleOld* r) { 342 342 first = new LNode(t,i,p,r); 343 343 last = first; … … 356 356 357 357 // insertion at the end of the list, needed for gPrev 358 void LList::insert(LPoly * lp) {358 void LList::insert(LPolyOld* lp) { 359 359 last = last>insert(lp); 360 360 if(NULL == first) { … … 369 369 } 370 370 371 void LList::insert(poly t,int i, poly p, Rule * r) {371 void LList::insert(poly t,int i, poly p, RuleOld* r) { 372 372 last = last>insert(t,i,p,r); 373 373 if(NULL == first) { … … 379 379 380 380 // insertion in front of the list, needed for sPolyList 381 void LList::insertSP(LPoly * lp) {381 void LList::insertSP(LPolyOld* lp) { 382 382 first = first>insertSP(lp); 383 383 length++; … … 385 385 } 386 386 387 void LList::insertSP(poly t,int i, poly p, Rule * r) {387 void LList::insertSP(poly t,int i, poly p, RuleOld* r) { 388 388 first = first>insertSP(t,i,p,r); 389 389 length++; … … 392 392 393 393 394 void LList::insertByLabel(poly t, int i, poly p, Rule * r) {394 void LList::insertByLabel(poly t, int i, poly p, RuleOld* r) { 395 395 first = first>insertByLabel(t,i,p,r); 396 396 length++; … … 483 483 484 484 // NOTE: We insert at the beginning of the list and length = i1, where i is the actual index. 485 // Thus given actual index i and idx being the index of the LPoly under investigation485 // Thus given actual index i and idx being the index of the LPolyOld under investigation 486 486 // the element on position lengthidx is the right one 487 487 LNode* LTagNode::get(int idx, int length) { … … 719 719 } 720 720 721 LPoly * CNode::getAdLp1() {721 LPolyOld* CNode::getAdLp1() { 722 722 return this>data>getAdLp1(); 723 723 } 724 724 725 LPoly * CNode::getAdLp2() {725 LPolyOld* CNode::getAdLp2() { 726 726 return this>data>getAdLp2(); 727 727 } … … 767 767 } 768 768 769 Rule * CNode::getTestedRule() {770 return this>data>getTestedRule ();769 RuleOld* CNode::getTestedRuleOld() { 770 return this>data>getTestedRuleOld(); 771 771 } 772 772 … … 854 854 } 855 855 856 RNode::RNode(Rule * r) {856 RNode::RNode(RuleOld* r) { 857 857 data = r; 858 858 next = NULL; … … 860 860 861 861 RNode::~RNode() { 862 //Print("DELETE R ULE\n");862 //Print("DELETE RuleOld\n"); 863 863 delete data; 864 864 } 865 865 866 RNode* RNode::insert(Rule * r) {866 RNode* RNode::insert(RuleOld* r) { 867 867 RNode* newElement = new RNode(r); 868 868 newElement>next = this; … … 873 873 //Print("IN INSERT: "); 874 874 //pWrite(t); 875 Rule * r = new Rule(i,t);876 //Print("ADDRESS OF R ULE: %p\n",r);875 RuleOld* r = new RuleOld(i,t); 876 //Print("ADDRESS OF RuleOld: %p\n",r); 877 877 RNode* newElement = new RNode(r); 878 878 //Print("ADDRESS OF RNODE: %p\n",newElement); 879 //Print("ADDRESS OF RNODE DATA: %p\n",newElement>getRule ());879 //Print("ADDRESS OF RNODE DATA: %p\n",newElement>getRuleOld()); 880 880 newElement>next = this; 881 881 return newElement; … … 883 883 884 884 885 RNode* RNode::insertOrdered(Rule * r) {885 RNode* RNode::insertOrdered(RuleOld* r) { 886 886 RNode* newElement = new RNode(r); 887 887 RNode* temp = this; … … 890 890 return newElement; 891 891 } 892 if(1 == pLmCmp(newElement>getRule Term(),temp>getRuleTerm())) {892 if(1 == pLmCmp(newElement>getRuleOldTerm(),temp>getRuleOldTerm())) { 893 893 newElement>next = temp; 894 894 return newElement; 895 895 } 896 896 else { 897 while(NULL != temp && 1 == pLmCmp(temp>getRule Term(),newElement>getRuleTerm())) {897 while(NULL != temp && 1 == pLmCmp(temp>getRuleOldTerm(),newElement>getRuleOldTerm())) { 898 898 temp = temp>getNext(); 899 899 } … … 908 908 } 909 909 910 Rule * RNode::getRule() {910 RuleOld* RNode::getRuleOld() { 911 911 return data; 912 912 } 913 913 914 int RNode::getRule Index() {914 int RNode::getRuleOldIndex() { 915 915 return data>getIndex(); 916 916 } 917 917 918 poly RNode::getRule Term() {918 poly RNode::getRuleOldTerm() { 919 919 return data>getTerm(); 920 920 } … … 923 923 RNode* temp = this; 924 924 while(NULL != temp) { 925 pWrite(temp>getRule Term());926 Print("%d\n\n",temp>getRule Index());925 pWrite(temp>getRuleOldTerm()); 926 Print("%d\n\n",temp>getRuleOldIndex()); 927 927 temp = temp>getNext(); 928 928 } … … 938 938 } 939 939 940 RList::RList(Rule * r) {940 RList::RList(RuleOld* r) { 941 941 first = new RNode(r); 942 942 } … … 950 950 //Print("1 %p\n",first); 951 951 //if(first) { 952 //Print("1' %p\n",first>getRule ());952 //Print("1' %p\n",first>getRuleOld()); 953 953 //Print("2 %p\n",first>getNext()); 954 //Print("3 %p\n",first>getNext()>getRule ());955 //Print("3 %p\n",first>getNext()>getRule Term());954 //Print("3 %p\n",first>getNext()>getRuleOld()); 955 //Print("3 %p\n",first>getNext()>getRuleOldTerm()); 956 956 //} 957 957 delete temp; … … 964 964 } 965 965 966 void RList::insert(Rule * r) {966 void RList::insert(RuleOld* r) { 967 967 first = first>insert(r); 968 968 } 969 969 970 void RList::insertOrdered(Rule * r) {970 void RList::insertOrdered(RuleOld* r) { 971 971 first = first>insertOrdered(r); 972 972 } … … 976 976 } 977 977 978 Rule * RList::getRule() {979 return this>getRule ();978 RuleOld* RList::getRuleOld() { 979 return this>getRuleOld(); 980 980 } 981 981 … … 1029 1029 1030 1030 // NOTE: We insert at the beginning of the list and length = i1, where i is the actual index. 1031 // Thus given actual index i and idx being the index of the LPoly under investigation1031 // Thus given actual index i and idx being the index of the LPolyOld under investigation 1032 1032 // the element on position lengthidx+1 is the right one 1033 1033 RNode* RTagNode::get(int idx, int length) { … … 1058 1058 RTagNode* temp = this; 1059 1059 if(NULL != temp && NULL != temp>getRNode()) { 1060 Print("1. element: %d, ",getRNode()>getRule ()>getIndex());1061 pWrite(getRNode()>getRule ()>getTerm());1060 Print("1. element: %d, ",getRNode()>getRuleOld()>getIndex()); 1061 pWrite(getRNode()>getRuleOld()>getTerm()); 1062 1062 temp = temp>next; 1063 1063 int i = 2; 1064 1064 while(NULL != temp>getRNode() && NULL != temp) { 1065 Print("%d. element: %d, ",i,getRNode()>getRule ()>getIndex());1066 pWrite(getRNode()>getRule ()>getTerm());1065 Print("%d. element: %d, ",i,getRNode()>getRuleOld()>getIndex()); 1066 pWrite(getRNode()>getRuleOld()>getTerm()); 1067 1067 temp = temp>next; 1068 1068 i++;
Note: See TracChangeset
for help on using the changeset viewer.