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

Function doRed

kernel/GBEngine/kstd1.cc:119–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118
119static int doRed (LObject* h, TObject* with,BOOLEAN intoT,kStrategy strat, bool redMoraNF)
120{
121 int ret;
122#if KDEBUG > 0
123 kTest_L(h);
124 kTest_T(with);
125#endif
126 // Hmmm ... why do we do this -- polys from T should already be normalized
127 if (!TEST_OPT_INTSTRATEGY)
128 with->pNorm();
129#ifdef KDEBUG
130 if (TEST_OPT_DEBUG)
131 {
132 PrintS("reduce ");h->wrp();PrintS(" with ");with->wrp();PrintLn();
133 }
134#endif
135 if (intoT)
136 {
137 // need to do it exactly like this: otherwise
138 // we might get errors
139 LObject L= *h;
140 L.Copy();
141 h->GetP();
142 h->length=h->pLength=pLength(h->p);
143 ret = ksReducePoly(&L, with, strat->kNoetherTail(), NULL, NULL, strat);
144 if (ret)
145 {
146 if (ret < 0) return ret;
147 if (h->tailRing != strat->tailRing)
148 h->ShallowCopyDelete(strat->tailRing,
149 pGetShallowCopyDeleteProc(h->tailRing,
150 strat->tailRing));
151 }
152 if(redMoraNF && (rField_is_Ring(currRing)))
153 enterT_strong(*h,strat);
154 else
155 enterT(*h,strat);
156 *h = L;
157 }
158 else
159 ret = ksReducePoly(h, with, strat->kNoetherTail(), NULL, NULL, strat);
160#ifdef KDEBUG
161 if (TEST_OPT_DEBUG)
162 {
163 PrintS("to ");h->wrp();PrintLn();
164 }
165#endif
166 return ret;
167}
168
169int redEcart (LObject* h,kStrategy strat)
170{

Callers 1

kstd1.ccFile · 0.85

Calls 15

kTest_LFunction · 0.85
kTest_TFunction · 0.85
PrintSFunction · 0.85
pLengthFunction · 0.85
ksReducePolyFunction · 0.85
enterT_strongFunction · 0.85
enterTFunction · 0.85
pNormMethod · 0.80
wrpMethod · 0.80
GetPMethod · 0.80
kNoetherTailMethod · 0.80

Tested by

no test coverage detected