Changeset c0632a4 in git
- Timestamp:
- Jul 5, 2018, 9:02:32 PM (5 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 3a961a3f6d0a9dd9edd07a18ca373384df3a221c
- Parents:
- 216e128447d274610a03d71c71d03d4e7d330814
- Location:
- kernel/GBEngine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kspoly.cc
r216e12 rc0632a4 96 96 #endif 97 97 98 if (tailRing->isLPring && t2 == NULL && PW->pUnshifted != NULL) {99 t2 = pNext(PW->pUnshifted);100 }101 102 98 if (t2==NULL) // Divisor is just one term, therefore it will 103 99 { // just cancel the leading term … … 108 104 109 105 p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2 110 111 poly lmRight;112 if (tailRing->isLPring) {113 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing);114 } // the while loop below won't be executed for letterplace115 106 116 107 //if (tailRing != currRing) … … 133 124 } 134 125 126 poly lmRight; 127 if (tailRing->isLPring) { 128 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing); 129 } 130 135 131 // take care of coef buisness 136 132 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) … … 227 223 #endif 228 224 229 if (tailRing->isLPring && t2 == NULL && PW->pUnshifted != NULL) {230 t2 = pNext(PW->pUnshifted);231 }232 233 225 if (t2==NULL) // Divisor is just one term, therefore it will 234 226 { // just cancel the leading term … … 239 231 240 232 p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2 241 242 poly lmRight;243 if (tailRing->isLPring) {244 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing);245 } // the while loop below won't be executed for letterplace246 233 247 234 if (tailRing != currRing) … … 262 249 ret = 1; 263 250 } 251 } 252 253 poly lmRight; 254 if (tailRing->isLPring) { 255 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing); 264 256 } 265 257 … … 432 424 #endif 433 425 434 if (tailRing->isLPring && t2 == NULL && PW->pUnshifted != NULL) {435 t2 = pNext(PW->pUnshifted);436 }437 438 426 if (t2==NULL) // Divisor is just one term, therefore it will 439 427 { // just cancel the leading term … … 444 432 445 433 p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2 446 447 poly lmRight;448 if (tailRing->isLPring) {449 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing);450 } // the while loop below won't be executed for letterplace451 434 452 435 if (tailRing != currRing) … … 467 450 ret = 1; 468 451 } 452 } 453 454 poly lmRight; 455 if (tailRing->isLPring) { 456 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing); 469 457 } 470 458 … … 670 658 #endif 671 659 672 if (tailRing->isLPring && t2 == NULL && PW->pUnshifted != NULL) {673 t2 = pNext(PW->pUnshifted);674 }675 676 660 if (t2==NULL) // Divisor is just one term, therefore it will 677 661 { // just cancel the leading term … … 682 666 683 667 p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2 684 685 poly lmRight;686 if (tailRing->isLPring) {687 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing);688 } // the while loop below won't be executed for letterplace689 668 690 669 if (tailRing != currRing) … … 705 684 ret = 1; 706 685 } 686 } 687 688 poly lmRight; 689 if (tailRing->isLPring) { 690 k_SplitFrame(lm, lmRight, PW->shift + 1, tailRing); 707 691 } 708 692 -
kernel/GBEngine/kutil.cc
r216e12 rc0632a4 566 566 else 567 567 { 568 if (currRing->isLPring && strat->T[j].shift > 0) { 569 pNext(p) = NULL; // pNext(p) points to the unshifted tail, don't try to delete it here 570 } 568 571 pDelete(&p); 569 572 } … … 822 825 if (T->p == NULL && i > 0) 823 826 return dReportError("%c[%d].p is NULL", TN, i); 824 pFalseReturn(p_Test(T->p, currRing)); 827 if (currRing->isLPring && T->shift > 0) { 828 // in this case, the order is not correct. test LM and tail separately 829 pFalseReturn(p_LmTest(T->p, currRing)); 830 pFalseReturn(p_Test(pNext(T->p), currRing)); 831 } else { 832 pFalseReturn(p_Test(T->p, currRing)); 833 } 825 834 } 826 835 … … 9277 9286 int i; 9278 9287 9279 pp_Test(p.p, currRing, p.tailRing); 9288 #ifdef PDEBUG 9289 if (currRing->isLPring && p.shift > 0) { 9290 // in this case, the order is not correct. test LM and tail separately 9291 p_LmTest(p.p, currRing); 9292 p_Test(pNext(p.p), currRing); 9293 } else { 9294 pp_Test(p.p, currRing, p.tailRing); 9295 } 9296 #endif 9280 9297 assume(strat->tailRing == p.tailRing); 9281 9298 // redMoraNF complains about this -- but, we don't really … … 9326 9343 } 9327 9344 9328 if ((strat->tailBin != NULL) && (pNext(p.p) != NULL)) 9345 // letterplace: if p.shift > 0 then pNext(p.p) is already in the tailBin 9346 if ((strat->tailBin != NULL) && (pNext(p.p) != NULL) && !(currRing->isLPring && p.shift > 0)) 9329 9347 { 9330 9348 pNext(p.p)=p_ShallowCopyDelete(pNext(p.p), … … 12501 12519 #ifdef HAVE_SHIFTBBA 12502 12520 /*2 12503 * puts p to the set T, starting with the at position atT12504 * a nd inserts all admissible shifts of p12521 * enteres all admissible shifts of p into T 12522 * assumes that p is already in T! 12505 12523 */ 12506 12524 void enterTShift(LObject p, kStrategy strat, int atT) … … 12514 12532 int toInsert = itoInsert(p.p, strat->tailRing); 12515 12533 12516 poly shifted;12517 12534 for (int i = 1; i <= toInsert; i++) 12518 12535 { 12519 shifted = p_mLPshift(p_Head(p.p, currRing), i, currRing);12520 LObject qq(shifted);12521 qq.SetpFDeg();12522 qq. SetShortExpVector();12536 poly shifted = p_mLPshift(p_Head(p.p, currRing), i, currRing); 12537 pNext(shifted) = pNext(p.p); 12538 LObject qq; 12539 qq.p = shifted; // don't use Set() because it'll test the poly order 12523 12540 qq.shift = i; 12524 qq.pUnshifted = pNext(p.p); 12525 strat->initEcart(&qq); 12526 qq.ecart = p.ecart; 12527 #ifdef KTEST 12528 kTest_T(&qq, strat->tailRing, -1, 'L'); 12529 #endif 12530 /* enter it into T, first el't is with the shift 0 */ 12531 enterT(qq, strat, atT); 12541 strat->initEcart(&qq); // initEcartBBA sets length, pLength, FDeg and ecart 12542 12543 enterT(qq, strat, atT); // enterT is modified, so it doesn't copy and delete the tail of shifted polys 12532 12544 } 12533 12545 } -
kernel/GBEngine/kutil.h
r216e12 rc0632a4 96 96 // letterplace 97 97 int shift; 98 poly pUnshifted;99 98 100 99 // initialization
Note: See TracChangeset
for help on using the changeset viewer.