95 if (
p->next==
NULL)
break;
154 if (strat->
tl<0)
return 1;
158 int i,
j,pass,ei, ii, h_d,ci;
159 unsigned long not_sev;
164 memset(
T,0,
sizeof(
T));
165 memset(C,0,
sizeof(
T));
166 const ring tailRing=strat->
tailRing;
169 d = reddeg =
h->GetpFDeg() +
h->ecart;
170 h->SetShortExpVector();
172 h_p =
h->GetLmTailRing();
198 ei = strat->
T[
j].ecart;
199 li = strat->
T[
j].pLength;
209 if (li<=0) li=strat->
T[
j].GetpLength();
219 if ((((strat->
T[
i].ecart < ei) && (ei>
h->ecart))
220 || ((strat->
T[
i].ecart <=
h->ecart)
221 && (strat->
T[
i].pLength <= li)
225 h_p, not_sev, tailRing))
230 ei = strat->
T[
i].ecart;
231 li = strat->
T[
i].pLength;
232 if (li<=0) li=strat->
T[
i].GetpLength();
247 Print(
"\nwith T[%d]:",ii);
256 int l_orig=strat->
T[ii].pLength;
263 strat->
T[ii].pLength=l_orig;
278 for(
int i=0;
i<=pass;
i++)
288 h->SetShortExpVector();
295 h->ecart = d-h_d+ei-
h->ecart;
#define UNLIKELY(expression)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
const CanonicalForm int s
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
int redLiftstd(LObject *h, kStrategy strat)
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 kBucketClear(kBucket_pt bucket, poly *p, int *length)
void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
void kBucket_Mult_n(kBucket_pt bucket, number n)
Multiply Bucket by number ,i.e. Bpoly == n*Bpoly.
void kBucketDestroy(kBucket_pt *bucket_pt)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
void kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
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 int index(p_Length length, p_Ord ord)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
static void p_Delete(poly *p, const ring r)
static unsigned pLength(poly a)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatiblity layer for legacy polynomial operations (over currRing)
void PrintS(const char *s)