2 *updates S: *the result is a set of polynomials which are in *normalform with respect to S */
| 8554 | *normalform with respect to S |
| 8555 | */ |
| 8556 | void updateS(BOOLEAN toT,kStrategy strat) |
| 8557 | { |
| 8558 | LObject h; |
| 8559 | int i, suc=0; |
| 8560 | poly redSi=NULL; |
| 8561 | BOOLEAN change,any_change; |
| 8562 | // Print("nach initS: updateS start mit sl=%d\n",(strat->sl)); |
| 8563 | // for (i=0; i<=(strat->sl); i++) |
| 8564 | // { |
| 8565 | // Print("s%d:",i); |
| 8566 | // if (strat->fromQ!=NULL) Print("(Q:%d) ",strat->fromQ[i]); |
| 8567 | // pWrite(strat->S[i]); |
| 8568 | // } |
| 8569 | // Print("currRing->OrdSgn=%d\n", currRing->OrdSgn); |
| 8570 | any_change=FALSE; |
| 8571 | if (rHasGlobalOrdering(currRing)) |
| 8572 | { |
| 8573 | while (suc != -1) |
| 8574 | { |
| 8575 | i=suc+1; |
| 8576 | while (i<=strat->sl) |
| 8577 | { |
| 8578 | change=FALSE; |
| 8579 | if(rField_is_Ring(currRing)) |
| 8580 | any_change = FALSE; |
| 8581 | if (((strat->fromQ==NULL) || (strat->fromQ[i]==0)) && (i>0)) |
| 8582 | { |
| 8583 | redSi = pHead(strat->S[i]); |
| 8584 | strat->S[i] = redBba(strat->S[i],i-1,strat); |
| 8585 | //if ((strat->ak!=0)&&(strat->S[i]!=NULL)) |
| 8586 | // strat->S[i]=redQ(strat->S[i],i+1,strat); /*reduce S[i] mod Q*/ |
| 8587 | if (pCmp(redSi,strat->S[i])!=0) |
| 8588 | { |
| 8589 | change=TRUE; |
| 8590 | any_change=TRUE; |
| 8591 | #ifdef KDEBUG |
| 8592 | if (TEST_OPT_DEBUG) |
| 8593 | { |
| 8594 | PrintS("reduce:"); |
| 8595 | wrp(redSi);PrintS(" to ");p_wrp(strat->S[i], currRing, strat->tailRing);PrintLn(); |
| 8596 | } |
| 8597 | #endif |
| 8598 | if (TEST_OPT_PROT) |
| 8599 | { |
| 8600 | if (strat->S[i]==NULL) |
| 8601 | PrintS("V"); |
| 8602 | else |
| 8603 | PrintS("v"); |
| 8604 | mflush(); |
| 8605 | } |
| 8606 | } |
| 8607 | pLmDelete(&redSi); |
| 8608 | if (strat->S[i]==NULL) |
| 8609 | { |
| 8610 | deleteInS(i,strat); |
| 8611 | i--; |
| 8612 | } |
| 8613 | else if (change) |
no test coverage detected