Changeset 70c15e in git for kernel/f5lists.cc


Ignore:
Timestamp:
Feb 22, 2009, 7:58:36 PM (14 years ago)
Author:
Christian Eder
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
6d5e7ee005c7a5c9c97446227e1b19c6ed68fc9a
Parents:
d8be851dd8f2cf657611debe1b34b05aedcdf65d
Message:
problem in cyclic_n(4) solved


git-svn-id: file:///usr/local/Singular/svn/trunk@11441 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/f5lists.cc

    rd8be851 r70c15e  
    101101// only used for the S-polys to be reduced (TopReduction building new S-polys with higher label)
    102102LNode* LNode::insertByLabel(poly t, int i, poly p, Rule* r) {
    103     if(0 == pLmCmp(t,this->getTerm()) || -1 == pLmCmp(t,this->getTerm())) {
     103    if(NULL == data) {
    104104        LNode* newElement   =   new LNode(t, i, p, r, this);
    105105        return newElement;
    106106    }
    107107    else {
    108         LNode* temp = this;
    109         while( NULL != temp->next->data ) {
    110             if( 0 == pLmCmp(t,temp->next->getTerm()) || -1 == pLmCmp(t,temp->next->getTerm())) {
    111                 LNode* newElement   =   new LNode(t, i, p, r, temp->next);
    112                 temp->next          =   newElement;
    113                 return this;
     108        if(0 == pLmCmp(t,this->getTerm()) || -1 == pLmCmp(t,this->getTerm())) {
     109            LNode* newElement   =   new LNode(t, i, p, r, this);
     110            return newElement;
     111        }
     112        else {
     113            LNode* temp = this;
     114            while(NULL != temp->next && NULL != temp->next->data) {
     115                if( 0 == pLmCmp(t,temp->next->getTerm()) || -1 == pLmCmp(t,temp->next->getTerm())) {
     116                    LNode* newElement   =   new LNode(t, i, p, r, temp->next);
     117                    temp->next          =   newElement;
     118                    return this;
     119                }
     120                else {
     121                    temp = temp->next;
     122                    Print("%p\n",temp);
     123                    Print("%p\n",temp->data);
     124                   
     125                    Print("%p\n",temp->next);
     126                }
    114127            }
    115             else {
    116                 temp = temp->next;
    117             }
     128        Print("HIER\n");
     129            LNode* newElement   =   new LNode(t, i, p, r, temp->next);
     130            temp->next          =   newElement;
     131            return this;
    118132        }
    119         LNode* newElement   =   new LNode(t, i, p, r, NULL);
    120         temp->next          =   newElement;
    121         return this;
    122133    }
    123134}
     
    197208    LNode* temp = this;
    198209    Print("___________________List of S-polynomials______________________:\n");
    199     while(NULL != temp->data) {
     210    while(NULL != temp && NULL != temp->data) {
     211        Print("HIER\n");
    200212        Print("Index: %d\n",temp->getIndex());
    201213        Print("Term: ");
Note: See TracChangeset for help on using the changeset viewer.