153{
154 if (strat->
tl<0)
return 1;
157 poly h_p;
158 int i,
j,pass,ei, ii, h_d,ci;
159 unsigned long not_sev;
160 long reddeg,d;
162 poly C[500];
164 memset(
T,0,
sizeof(
T));
165 memset(C,0,
sizeof(
T));
166 const ring tailRing=strat->
tailRing;
167
169 d = reddeg =
h->GetpFDeg() +
h->ecart;
170 h->SetShortExpVector();
171 int li;
172 h_p =
h->GetLmTailRing();
173 not_sev = ~ h->sev;
174
175
177
179
180
181
182
183
184
187 {
190 {
191
195 return 1;
196 }
197
198 ei = strat->
T[
j].ecart;
199 li = strat->
T[
j].pLength;
202
203
204
205
208 {
209 if (li<=0) li=strat->
T[
j].GetpLength();
210 if (li>1)
212 {
213
216 break;
217
218
219 if ((((strat->
T[
i].ecart < ei) && (ei>
h->ecart))
220 || ((strat->
T[
i].ecart <=
h->ecart)
221 && (strat->
T[
i].pLength <= li)
223 &&
225 h_p, not_sev, tailRing))
226 {
227
228
229
230 ei = strat->
T[
i].ecart;
231 li = strat->
T[
i].pLength;
232 if (li<=0) li=strat->
T[
i].GetpLength();
234 if (li==1) break;
235 }
236 }
237 }
238
239
240
241
242#ifdef KDEBUG
244 {
247 Print(
"\nwith T[%d]:",ii);
249 }
250#endif
252
253
254
255
256 int l_orig=strat->
T[ii].pLength;
257
261
263 strat->
T[ii].pLength=l_orig;
264
266
267#ifdef KDEBUG
269 {
273 }
274#endif
276 {
277
278 for(
int i=0;
i<=pass;
i++)
279 {
282 }
286 return 0;
287 }
288 h->SetShortExpVector();
289 not_sev = ~ h->sev;
291
292 if (ei <= h->ecart)
294 else
295 h->ecart = d-h_d+ei-
h->ecart;
296
297
298
299
300
301
302
303 pass++;
306 }
307}
static poly lazyComp(number *A, poly *M, poly *T, int index, poly s, int *l, const ring tailR)
static void kAppend(poly t, TObject *h)
static poly kSplitAt(int k, TObject *h, kStrategy strat)
void kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, poly *mon, kStrategy strat)
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start)
return -1 if no divisor is found number of first divisor in T, otherwise
static void kDeleteLcm(LObject *P)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
void PrintS(const char *s)