Changeset 416ea2 in git for kernel/f5lists.cc
- Timestamp:
- Feb 16, 2009, 3:23:42 PM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d59666cfeced5db8d8654b6ae282bedc5855d28f
- Parents:
- 61d32c91fe3976149b9b30938476f2c3c1257eee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/f5lists.cc
r61d32c r416ea2 30 30 next = NULL; 31 31 gPrevRedCheck = NULL; 32 completedRedCheck = NULL;33 32 } 34 33 LNode::LNode(LPoly* lp) { … … 36 35 next = NULL; 37 36 gPrevRedCheck = NULL; 38 completedRedCheck = NULL;39 37 } 40 38 … … 44 42 next = l; 45 43 gPrevRedCheck = NULL; 46 completedRedCheck = NULL; 47 } 48 49 LNode::LNode(poly t, int i, poly p, Rule* r, LNode* gPCheck, LNode* CompCheck) { 44 } 45 46 LNode::LNode(poly t, int i, poly p, Rule* r, LNode* gPCheck) { 50 47 LPoly* lp = new LPoly(t,i,p,r); 51 48 data = lp; 52 49 next = NULL; 53 50 gPrevRedCheck = gPCheck; 54 completedRedCheck = CompCheck;55 51 } 56 52 57 LNode::LNode(poly t, int i, poly p, Rule* r, LNode* gPCheck, LNode* CompCheck, LNode*l) {53 LNode::LNode(poly t, int i, poly p, Rule* r, LNode* gPCheck, LNode* l) { 58 54 LPoly* lp = new LPoly(t,i,p,r); 59 55 data = lp; 60 56 next = l; 61 57 gPrevRedCheck = gPCheck; 62 completedRedCheck = CompCheck;63 58 } 64 59 … … 67 62 next = ln->getNext(); 68 63 gPrevRedCheck = NULL; 69 completedRedCheck = NULL;70 64 } 71 65 72 66 LNode::~LNode() { 73 delete next;67 //delete next; 74 68 delete gPrevRedCheck; 75 delete completedRedCheck;76 69 delete data; 77 70 } … … 85 78 86 79 LNode* LNode::insert(poly t, int i, poly p, Rule* r) { 87 LNode* newElement = new LNode(t, i, p, r, NULL, NULL,this);80 LNode* newElement = new LNode(t, i, p, r, NULL, this); 88 81 return newElement; 89 82 } 90 83 84 LNode* LNode::append(poly t, int i, poly p, Rule* r) { 85 LNode* newElement = new LNode(t,i,p,r,NULL); 86 this->next = newElement; 87 } 88 91 89 // insert new elemets to the list w.r.t. increasing labels 92 90 // only used for the S-polys to be reduced (TopReduction building new S-polys with higher label) … … 151 149 } 152 150 153 LNode* LNode::getCompletedRedCheck() {154 return completedRedCheck;155 }156 157 151 // set the data from the LPoly saved in LNode 158 152 void LNode::setPoly(poly p) { … … 170 164 void LNode::setGPrevRedCheck(LNode* l) { 171 165 gPrevRedCheck = l; 172 }173 174 void LNode::setCompletedRedCheck(LNode* l) {175 completedRedCheck = l;176 166 } 177 167 … … 200 190 LList::LList() { 201 191 first = new LNode(); 192 last = first; 202 193 length = 0; 203 194 } … … 205 196 LList::LList(LPoly* lp) { 206 197 first = new LNode(lp); 198 last = first; 207 199 length = 1; 208 200 } … … 210 202 LList::LList(poly t,int i,poly p,Rule* r) { 211 203 first = new LNode(t,i,p,r); 204 last = first; 212 205 length = 1; 213 206 } … … 228 221 } 229 222 223 void LList::append(poly t, int i, poly p, Rule* r) { 224 last = last->append(t,i,p,r); 225 length++; 226 } 227 230 228 void LList::insertByLabel(poly t, int i, poly p, Rule* r) { 231 229 first = first->insertByLabel(t,i,p,r); … … 248 246 LNode* LList::getFirst() { 249 247 return first; 248 } 249 250 LNode* LList::getLast() { 251 return last; 250 252 } 251 253 … … 262 264 first = l; 263 265 delete(temp); 266 length--; 264 267 } 265 268
Note: See TracChangeset
for help on using the changeset viewer.