- Timestamp:
- Feb 27, 2009, 11:22:30 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ab1c364e790c486830be3f3070fa8f106c67d182
- Parents:
- 0ffc8230cf8843aba541f656189c14bc57b1700f
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/f5gb.cc
r0ffc823 r8066e80 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: f5gb.cc,v 1.3 4 2009-02-26 09:01:52ederc Exp $ */4 /* $Id: f5gb.cc,v 1.35 2009-02-27 22:22:30 ederc Exp $ */ 5 5 /* 6 6 * ABSTRACT: f5gb interface … … 106 106 // DEBUG STUFF FOR SPOLYLIST 107 107 LNode* temp = sPolyList->getFirst(); 108 while(NULL != temp && NULL != temp->getLPoly()) {108 //while(NULL != temp && NULL != temp->getLPoly()) { 109 109 //Print("Spolylist element: "); 110 110 //pWrite(temp->getPoly()); 111 temp = temp->getNext();112 }111 //temp = temp->getNext(); 112 //} 113 113 // reduction process of new S-polynomials and also adds new critical pairs to critPairs 114 114 reduction(sPolyList, critPairs, gPrev, rules, lTag, rTag, gbPrev); … … 186 186 pSetCoeff(u2,nOne); 187 187 //if(gPrev->getLast()->getIndex()==5) { 188 //Print("IN CRITPAIRS\n");188 //Print("IN CRITPAIRS\n"); 189 189 // pWrite(u1); 190 190 // Print("1st ELEMENT: "); … … 219 219 } 220 220 // for debugging 221 if(NULL != critPairs && gPrev->getLast()->getIndex() == 4) {221 //if(NULL != critPairs) { 222 222 //critPairs->print(); 223 223 //sleep(5); 224 }224 //} 225 225 } 226 226 … … 246 246 //Print("TESTED ELEMENT: "); 247 247 //pWrite(l->getPoly()); 248 //pWrite(l->getTerm()); 248 249 //pWrite(ppMult_qq(t,l->getTerm())); 249 250 //Print("%d\n\n",l->getIndex()); … … 280 281 tempR = tempR->getNext(); 281 282 } 282 //Print("TESTED ELEMENT: ");283 //Print("TESTED ELEMENT: "); 283 284 //pWrite(l->getPoly()); 285 //pWrite(l->getTerm()); 284 286 //pWrite(ppMult_qq(t,l->getTerm())); 285 287 //Print("%d\n\n",l->getIndex()); … … 348 350 //Print("RULES: \n"); 349 351 RNode* tempR = rules->getFirst(); 350 while(NULL != tempR->getRule()) {352 //while(NULL != tempR->getRule()) { 351 353 //pWrite(tempR->getRuleTerm()); 352 354 //Print("%d\n\n",tempR->getRuleIndex()); 353 tempR = tempR->getNext();354 }355 //tempR = tempR->getNext(); 356 //} 355 357 //Print("TESTED ELEMENT: "); 356 358 //pWrite(l->getPoly()); 359 //pWrite(l->getTerm()); 357 360 //pWrite(ppMult_qq(t,l->getTerm())); 358 361 //Print("%d\n\n",l->getIndex()); … … 421 424 //Print("RULE ADDED: \n"); 422 425 //pWrite(rules->getFirst()->getRuleTerm()); 423 sPolyList->insert SP(ppMult_qq(temp->getT1(),temp->getLp1Term()),temp->getLp1Index(),sp,rules->getFirst()->getRule());426 sPolyList->insertByLabel(ppMult_qq(temp->getT1(),temp->getLp1Term()),temp->getLp1Index(),sp,rules->getFirst()->getRule()); 424 427 } 425 428 // data is saved in sPolyList or zero => delete sp … … 528 531 //Print("##################IN CRITPAIRS IN REDUCTION#####################\n"); 529 532 criticalPair(gPrev,critPairs,lTag,rTag,rules); 533 //Print("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++H I E R++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); 530 534 } 531 535 else { … … 533 537 LNode* tempLoop = gPrev->getFirst(); 534 538 //Print("AUSGABE IN REDUCTION:\n"); 535 while(NULL != tempLoop) {539 //while(NULL != tempLoop) { 536 540 //pWrite(tempLoop->getPoly()); 537 tempLoop = tempLoop->getNext();538 }541 //tempLoop = tempLoop->getNext(); 542 //} 539 543 //sleep(10); 540 544 } … … 555 559 do { 556 560 LNode* tempRed = new LNode(); 557 Print("TESTED POLYNOMIAL IN THE FOLLOWING: ");558 pWrite(l->getPoly());561 //Print("TESTED POLYNOMIAL IN THE FOLLOWING: "); 562 //pWrite(l->getPoly()); 559 563 tempRed = findReductor(l,gPrev,rules,lTag,rTag); 560 564 //Print("--------------------------------HIER DEBUG 2----------------------------------\n"); … … 563 567 // if label of reductor is greater than the label of l we have to built a new element 564 568 // and add it to sPolyList 565 Print("REDUCTOR POLYNOMIAL: ");566 pWrite(tempRed->getPoly());567 Print("TERM: ");568 pWrite(tempRed->getTerm());569 //Print("REDUCTOR POLYNOMIAL: "); 570 //pWrite(tempRed->getPoly()); 571 //Print("TERM: "); 572 //pWrite(tempRed->getTerm()); 569 573 if(pLmCmp(tempRed->getTerm(),l->getTerm()) == 1) { 570 574 // needed sinc pSub destroys the arguments! 575 //Print("H----------I------------E--------------R\n"); 571 576 poly temp_poly_l = pInit(); 572 577 temp_poly_l = pCopy(l->getPoly()); … … 594 599 //Print("%p\n",sPolyList->getFirst()->getLPoly()); 595 600 //Print("SPOLYLIST LENGTH: %d\n",sPolyList->getLength()); 601 //sPolyList->print(); 602 596 603 sPolyList->insertByLabel(tempRed); 597 //Print("OH JE\n"); 604 //sPolyList->print(); 605 //Print("SPOLYLIST LENGTH: %d\n",sPolyList->getLength()); 606 //Print("OH JE\n"); 598 607 } 599 608 else { … … 635 644 if(NULL != l->getPoly()) { 636 645 pNorm(l->getPoly()); 637 Print("----------------------------------ADDED TO GPREV IN TOPREDUCTION:-------------------------------------- ");638 pWrite(l->getPoly());639 pWrite(l->getTerm());640 Print("INDEX: %d\n\n\n", l->getIndex());641 646 //Print("----------------------------------ADDED TO GPREV IN TOPREDUCTION:-------------------------------------- "); 647 //pWrite(l->getPoly()); 648 //pWrite(l->getTerm()); 649 //Print("INDEX: %d\n\n\n", l->getIndex()); 650 //sleep(20); 642 651 gPrev->insert(l->getLPoly()); 643 652 //Print("GPREV: \n"); 644 653 LNode* tempLoop = gPrev->getFirst(); 645 while(NULL != tempLoop) {654 //while(NULL != tempLoop) { 646 655 //Print("HERE\n"); 647 656 //pWrite(tempLoop->getPoly()); 648 tempLoop = tempLoop->getNext();649 }657 //tempLoop = tempLoop->getNext(); 658 //} 650 659 } 651 660 break; … … 685 694 // does the head of the element of gPrev divides the head of 686 695 // the to be reduced element? 687 //Print("-------------FOUND REDUCTORS----------------------\n"); 688 //Print("\n"); 689 //pWrite(temp->getPoly()); 690 //pWrite(temp->getTerm()); 696 Print("-------------FOUND REDUCTORS----------------------\n"); 697 Print("\n"); 698 pWrite(temp->getPoly()); 699 pWrite(temp->getTerm()); 700 pWrite(t); 701 Print("HALLO\n"); 691 702 if(pLmDivisibleByNoComp(temp->getPoly(),t)) { 703 Print("HALLO\n"); 692 704 // get all the information needed for the following tests 693 705 // of the criteria 694 706 u = pDivide(t,pHead(temp->getPoly())); 695 707 pSetCoeff(u,nOne); 696 //pWrite(u);697 //Print("\n");708 pWrite(u); 709 Print("\n"); 698 710 red = ppMult_qq(u,temp->getPoly()); 699 711 pNorm(red); … … 701 713 //pSetCoeff(u,nOne); 702 714 // check if both have the same label 715 Print("HALLO\n"); 703 716 if(pLmCmp(u,l->getTerm()) != 0) { 717 Print("HALLO\n"); 704 718 // passing criterion2 ? 705 719 if(!criterion2(u,temp,rules,rTag)) { … … 708 722 //Print("HIER DEBUG\n"); 709 723 l->setGPrevRedCheck(temp); 710 LNode* redNode = new LNode( u,temp->getIndex(),red,NULL,NULL);724 LNode* redNode = new LNode(ppMult_qq(u,temp->getTerm()),temp->getIndex(),red,NULL,NULL); 711 725 return redNode; 712 726 } … … 714 728 } 715 729 } 730 Print("%p\n",temp->getNext()); 731 pWrite(temp->getPoly()); 732 Print("HALLO\n"); 716 733 temp = temp->getNext(); 717 734 } -
kernel/f5lists.cc
r0ffc823 r8066e80 91 91 LNode* LNode::insertSP(LPoly* lp) { 92 92 LNode* newElement = new LNode(lp, this); 93 Print("INSERTED IN SPOLYLIST: "); 94 pWrite(lp->getTerm()); 93 95 return newElement; 94 96 } … … 96 98 LNode* LNode::insertSP(poly t, int i, poly p, Rule* r) { 97 99 LNode* newElement = new LNode(t, i, p, r, NULL, this); 98 return newElement; 100 Print("INSERTED IN SPOLYLIST: "); 101 pWrite(t); 102 return newElement; 99 103 } 100 104 // insert new elemets to the list w.r.t. increasing labels 101 105 // only used for the S-polys to be reduced (TopReduction building new S-polys with higher label) 102 106 LNode* LNode::insertByLabel(poly t, int i, poly p, Rule* r) { 103 if(NULL == this || NULL == data) { 104 LNode* newElement = new LNode(t, i, p, r, this); 107 Print("ADDING SOLYS TO THE LIST\n"); 108 Print("new element: "); 109 pWrite(t); 110 if(NULL == this || NULL == data) { 111 LNode* newElement = new LNode(t, i, p, r, NULL, this); 105 112 return newElement; 106 113 } 107 114 else { 115 Print("tested element1: "); 116 pWrite(this->getTerm()); 108 117 if(-1 == pLmCmp(t,this->getTerm())) { 109 LNode* newElement = new LNode(t, i, p, r, this); 118 Print("HIERDRIN\n"); 119 LNode* newElement = new LNode(t, i, p, r, NULL, this); 120 Print("%p\n",this); 121 Print("%p\n",newElement->next); 110 122 return newElement; 111 123 } … … 113 125 LNode* temp = this; 114 126 while(NULL != temp->next && NULL != temp->next->data) { 115 if(-1 == pLmCmp(t,temp->next->getTerm())) { 116 LNode* newElement = new LNode(t, i, p, r, temp->next); 127 Print("tested element: "); 128 pWrite(temp->getTerm()); 129 if(-1 == pLmCmp(t,temp->next->getTerm())) { 130 LNode* newElement = new LNode(t, i, p, r, NULL, temp->next); 117 131 temp->next = newElement; 118 132 return this; … … 127 141 } 128 142 //Print("HIER\n"); 129 LNode* newElement = new LNode(t, i, p, r, temp->next);143 LNode* newElement = new LNode(t, i, p, r, NULL, temp->next); 130 144 temp->next = newElement; 131 145 return this; … … 214 228 Print("%p\n",this); 215 229 while(NULL != temp && NULL != temp->data) { 216 Print("HIER\n");217 230 Print("Index: %d\n",temp->getIndex()); 218 231 Print("Term: "); … … 220 233 Print("Poly: "); 221 234 pWrite(temp->getPoly()); 222 Print(" \n");235 Print("%p\n",temp->next); 223 236 temp = temp->next; 224 237 } 238 Print("_______________________________________________________________\n"); 225 239 } 226 240
Note: See TracChangeset
for help on using the changeset viewer.