12 #include <factory/factory.h>
68 const int copy,
const ring
r)
75 assume(lp >= 1 && lq >= 1);
95 if (rn ==
NULL)
goto Smaller;
125 if (qq ==
NULL)
goto Finish;
198 pAssume1(! p_HaveCommonMonoms(p, q, r));
212 if (rn ==
NULL)
goto Smaller;
236 if (qq ==
NULL)
goto Finish;
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
CFArray copy(const CFList &list)
write elements of list into an array
void kBucketInit(kBucket_pt bucket, poly lm, int length)
static int min(int a, int b)
const CanonicalForm CFMap CFMap int &both_non_zero int n
#define MIN_LENGTH_BUCKET
static poly pp_Mult_mm(poly p, poly m, const ring r)
static BOOLEAN rField_is_Domain(const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
BOOLEAN pHaveCommonMonoms(poly p, poly q)
kBucket_pt kBucketCreate(ring bucket_ring)
Creation/Destruction of buckets.
static void p_LmFree(poly p, ring)
static poly _p_Mult_q_Normal_ZeroDiv(poly p, poly q, const int copy, const ring r)
static int pLength(poly a)
poly kBucketExtractLm(kBucket_pt bucket)
#define TEST_OPT_NOT_BUCKETS
void kBucketDestroy(kBucket_pt *bucket_pt)
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
void kBucketSetLm(kBucket_pt bucket, poly lm)
static poly _p_Mult_q_Normal(poly p, poly q, const int copy, const ring r)
poly _p_Mult_q(poly p, poly q, const int copy, const ring r)
Returns: p * q, Destroys: if !copy then p, q Assumes: pLength(p) >= 2 pLength(q) >=2.
static poly p_LmFreeAndNext(poly p, ring)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
BOOLEAN pqLength(poly p, poly q, int &lp, int &lq, const int min)
static bool Greater(mono_type m1, mono_type m2)
#define p_LmCmpAction(p, q, r, actionE, actionG, actionS)
static void p_Delete(poly *p, const ring r)
static BOOLEAN rField_is_Ring(const ring r)
static FORCE_INLINE BOOLEAN nCoeff_is_Domain(const coeffs r)
returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
static poly _p_Mult_q_Bucket(poly p, const int lp, poly q, const int lq, const int copy, const ring r)
void kBucket_Plus_mm_Mult_pp(kBucket_pt bucket, poly m, poly p, int l)
Bpoly == Bpoly + m*p; where m is a monom Does not destroy p and m assume (l <= 0 || pLength(p) == l) ...
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static poly p_Plus_mm_Mult_qq(poly p, poly m, poly q, int &lp, int lq, const ring r)