| 10280 | } |
| 10281 | |
| 10282 | void completeReduce (kStrategy strat, BOOLEAN withT) |
| 10283 | { |
| 10284 | int i; |
| 10285 | int low = (((rHasGlobalOrdering(currRing)) && (strat->ak==0)) ? 1 : 0); |
| 10286 | LObject L; |
| 10287 | |
| 10288 | #ifdef KDEBUG |
| 10289 | // need to set this: during tailreductions of T[i], T[i].max is out of |
| 10290 | // sync |
| 10291 | sloppy_max = TRUE; |
| 10292 | #endif |
| 10293 | |
| 10294 | strat->noTailReduction = FALSE; |
| 10295 | //if(rHasMixedOrdering(currRing)) strat->noTailReduction = TRUE; |
| 10296 | if (TEST_OPT_PROT) |
| 10297 | { |
| 10298 | PrintLn(); |
| 10299 | // if (timerv) writeTime("standard base computed:"); |
| 10300 | } |
| 10301 | if (TEST_OPT_PROT) |
| 10302 | { |
| 10303 | Print("(S:%d)",strat->sl);mflush(); |
| 10304 | } |
| 10305 | for (i=strat->sl; i>=low; i--) |
| 10306 | { |
| 10307 | int end_pos=strat->sl; |
| 10308 | if ((strat->fromQ!=NULL) && (strat->fromQ[i])) continue; // do not reduce Q_i |
| 10309 | if (strat->ak==0) end_pos=i-1; |
| 10310 | TObject* T_j = strat->s_2_t(i); |
| 10311 | if ((T_j != NULL)&&(T_j->p==strat->S[i])) |
| 10312 | { |
| 10313 | L = *T_j; |
| 10314 | #ifdef KDEBUG |
| 10315 | if (TEST_OPT_DEBUG) |
| 10316 | { |
| 10317 | Print("test S[%d]:",i); |
| 10318 | p_wrp(L.p,currRing,strat->tailRing); |
| 10319 | PrintLn(); |
| 10320 | } |
| 10321 | #endif |
| 10322 | if (rHasGlobalOrdering(currRing)) |
| 10323 | strat->S[i] = redtailBba(&L, end_pos, strat, withT,FALSE /*no normalize*/); |
| 10324 | else |
| 10325 | strat->S[i] = redtail(&L, strat->sl, strat); |
| 10326 | #ifdef KDEBUG |
| 10327 | if (TEST_OPT_DEBUG) |
| 10328 | { |
| 10329 | Print("to (tailR) S[%d]:",i); |
| 10330 | p_wrp(strat->S[i],currRing,strat->tailRing); |
| 10331 | PrintLn(); |
| 10332 | } |
| 10333 | #endif |
| 10334 | |
| 10335 | if (strat->redTailChange) |
| 10336 | { |
| 10337 | if (T_j->max_exp != NULL) p_LmFree(T_j->max_exp, strat->tailRing); |
| 10338 | if (pNext(T_j->p) != NULL) |
| 10339 | T_j->max_exp = p_GetMaxExpP(pNext(T_j->p), strat->tailRing); |
no test coverage detected