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

Function updateS

kernel/GBEngine/kutil.cc:8556–8785  ·  view source on GitHub ↗

2 *updates S: *the result is a set of polynomials which are in *normalform with respect to S */

Source from the content-addressed store, hash-verified

8554*normalform with respect to S
8555*/
8556void 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)

Callers 4

kInterRedCCFunction · 0.85
initBuchMoraFunction · 0.85
initSbaBuchMoraFunction · 0.85
kInterRedOldFunction · 0.85

Calls 15

rHasGlobalOrderingFunction · 0.85
redBbaFunction · 0.85
PrintSFunction · 0.85
wrpFunction · 0.85
deleteInSFunction · 0.85
p_Cleardenom_nFunction · 0.85
p_CleardenomFunction · 0.85
pNormFunction · 0.85
reorderSFunction · 0.85
enterTFunction · 0.85
enterTShiftFunction · 0.85
redMoraFunction · 0.85

Tested by

no test coverage detected