MCPcopy Create free account
hub / github.com/Singular/Singular / completeReduce

Function completeReduce

kernel/GBEngine/kutil.cc:10282–10397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10280}
10281
10282void 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);

Callers 10

kInterRedCCFunction · 0.85
k_sca_gr_bbaFunction · 0.85
k_sca_bbaFunction · 0.85
k_sca_moraFunction · 0.85
kstd2.ccFile · 0.85
bbaShiftFunction · 0.85
gr_kstd2.ccFile · 0.85
moraFunction · 0.85
kInterRedOldFunction · 0.85
kInterRedBbaFunction · 0.85

Calls 13

rHasGlobalOrderingFunction · 0.85
redtailFunction · 0.85
p_LmFreeFunction · 0.85
p_GetMaxExpPFunction · 0.85
p_Cleardenom_nFunction · 0.85
p_CleardenomFunction · 0.85
PrintSFunction · 0.85
s_2_tMethod · 0.80
pCleardenomMethod · 0.80
redtailBbaFunction · 0.70
PrintLnFunction · 0.50
PrintFunction · 0.50

Tested by

no test coverage detected