Changeset 0179d5 in git for kernel/f5lists.cc
- Timestamp:
- Jul 16, 2009, 9:47:51 AM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 4feee0a979cff0b1422136e2611e127a8267eb8d
- Parents:
- d4f44f4f228fbb8258ce8e9927141d37d4470719
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/f5lists.cc
rd4f44f r0179d5 212 212 213 213 // deletes the first elements of the list with the same degree 214 // only used for the S-polys, which are already sorted by increasing degree by CList 214 // only used for the S-polys, which are already sorted by increasing degree by CListOld 215 215 LNode* LNode::deleteByDeg() { 216 216 return this; … … 583 583 } 584 584 585 CNode::CNode(CPair * c) {585 CNode::CNode(CPairOld* c) { 586 586 data = c; 587 587 next = NULL; 588 588 } 589 589 590 CNode::CNode(CPair * c, CNode* n) {590 CNode::CNode(CPairOld* c, CNode* n) { 591 591 data = c; 592 592 next = n; … … 601 601 // working only with linked, but not doubly linked lists due to memory usage we have to check the 602 602 // insertion around the first element separately from the insertion around all other elements in the list 603 CNode* CNode::insert(CPair * c) {603 CNode* CNode::insert(CPairOld* c) { 604 604 if(NULL == this) { 605 605 CNode* newElement = new CNode(c, this); … … 695 695 } 696 696 697 // get the first elements from CList which by the above sorting have minimal degree697 // get the first elements from CListOld which by the above sorting have minimal degree 698 698 CNode* CNode::getMinDeg() { 699 699 CNode* temp = this; … … 703 703 } 704 704 CNode* returnCNode = temp->next; 705 // every CList should end with a (NULL,NULL) element for a similar behaviour705 // every CListOld should end with a (NULL,NULL) element for a similar behaviour 706 706 // using termination conditions throughout the algorithm 707 707 temp->next = NULL; … … 711 711 } 712 712 713 CPair * CNode::getData() {713 CPairOld* CNode::getData() { 714 714 return data; 715 715 } … … 800 800 /* 801 801 ==================================== 802 functions working on the class CList 802 functions working on the class CListOld 803 803 ==================================== 804 804 */ 805 // for initialization of CList s, last element alwas has data=NULL and next=NULL806 CList ::CList() {805 // for initialization of CListOlds, last element alwas has data=NULL and next=NULL 806 CListOld::CListOld() { 807 807 first = NULL; 808 808 } 809 809 810 CList ::CList(CPair* c) {810 CListOld::CListOld(CPairOld* c) { 811 811 first = new CNode(c); 812 812 } 813 813 814 CList ::~CList() {814 CListOld::~CListOld() { 815 815 CNode* temp; 816 816 while(NULL != first) { … … 823 823 // insert sorts the critical pairs firstly by increasing total degree, secondly by increasing label 824 824 // note: as all critical pairs have the same index here, the second sort is done on the terms of the labels 825 void CList ::insert(CPair* c) {825 void CListOld::insert(CPairOld* c) { 826 826 first = first->insert(c); 827 827 } 828 828 829 CNode* CList ::getFirst() {829 CNode* CListOld::getFirst() { 830 830 return first; 831 831 } 832 832 833 // get the first elements from CList which by the above sorting have minimal degree833 // get the first elements from CListOld which by the above sorting have minimal degree 834 834 // returns the pointer on the first element of those 835 CNode* CList ::getMinDeg() {835 CNode* CListOld::getMinDeg() { 836 836 CNode* temp = first; 837 837 first = first->getMinDeg(); … … 839 839 } 840 840 841 void CList ::print() {841 void CListOld::print() { 842 842 first->print(); 843 843 }
Note: See TracChangeset
for help on using the changeset viewer.