13 #if !defined(NO_KINLINE) || defined(KUTIL_CC) 46 if (i >= 0 && i <=
sl)
49 if ((sri >= 0) && (sri <=
tl))
52 if ((t !=
NULL) && (t->p ==
S[i]))
197 is_normalized =
FALSE;
241 return GetLmCurrRing();
304 is_normalized =
FALSE;
352 if (new_tailBin ==
NULL) new_tailBin = new_tailRing->PolyBin;
370 tailRing, new_tailRing, new_tailBin);
401 FDeg = this->pFDeg();
406 assume(FDeg == this->pFDeg());
415 FDeg = this->pFDeg();
416 long d = this->pLDeg();
471 is_normalized =
TRUE;
524 unsigned l = GetpLength();
525 if (use_bucket && (l > 1))
527 poly tp = GetLmTailRing();
614 poly ret = GetLmTailRing();
656 poly tp = GetLmTailRing();
701 p_shallow_copy_delete);
703 new_tailRing->PolyBin,p_shallow_copy_delete,
727 bucket->buckets_length[i]);
737 poly tp = GetLmTailRing();
768 FDeg = this->pFDeg();
769 long d = this->pLDeg();
775 FDeg = this->pFDeg();
776 long d = this->pLDeg(use_last);
785 return bucket->buckets_length[
i] + 1;
791 length = this->GetpLength();
799 poly tp = GetLmTailRing();
823 memset(
this, 0,
sizeof(*
this));
843 assume(i_r2 >= 0 && i_r2 <= strat->
tl);
859 if (i_r1 == -1) i_r1 =
kFindInT(p1, strat->
T, strat->
tl);
861 assume(i_r1 >= 0 && i_r1 <= strat->
tl);
862 assume(i_r2 >= 0 && i_r2 <= strat->tl);
863 T_1 = strat->
R[i_r1];
864 T_2 = strat->
R[i_r2];
946 for (i = p_r->N; i; i--)
951 if (x > (
long) m_r->bitmask)
goto false_return;
957 if (-x > (
long) m_r->bitmask)
goto false_return;
993 for (i = leadRing->N; i>=0; i--)
1031 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1032 Red->HeadNormalize();
1060 return L.GetLmCurrRing();
1070 return L.GetLmCurrRing();
1080 return L.GetLmCurrRing();
1152 #endif // defined(KINLINE) || defined(KUTIL_CC) KINLINE void Init(ring tailRing=currRing)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
KINLINE poly GetP(omBin lmBin=NULL)
denominator_list_s * denominator_list
static number Copy(number a, const coeffs r)
KINLINE TObject ** initR()
const CanonicalForm int s
CFArray copy(const CFList &list)
write elements of list into an array
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
void kBucketShallowCopyDelete(kBucket_pt bucket, ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete)
For changing the ring of the Bpoly to new_tailBin.
KINLINE void SetShortExpVector()
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
static CanonicalForm bound(const CFMatrix &M)
static poly p_LmDeleteAndNext(poly p, const ring r)
KINLINE unsigned long * initsevT()
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
KINLINE void Set(ring r=currRing)
KINLINE sLObject & operator=(const sTObject &)
Compatiblity layer for legacy polynomial operations (over currRing)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
KINLINE int ksReducePolyTail(LObject *PR, TObject *PW, LObject *Red)
static BOOLEAN rIsSyzIndexRing(const ring r)
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
#define TEST_OPT_CONTENTSB
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
KINLINE sLObject(ring tailRing=currRing)
KINLINE void Init(ring r=currRing)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
KINLINE void HeadNormalize()
static poly p_LmShallowCopyDelete(poly p, const ring r)
denominator_list DENOMINATOR_LIST
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
static long p_Totaldegree(poly p, const ring r)
void deleteInS(int i, kStrategy strat)
pShallowCopyDeleteProc p_shallow_copy_delete
void p_Norm(poly p1, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
void kBucket_Mult_n(kBucket_pt bucket, number n)
Multiply Bucket by number ,i.e. Bpoly == n*Bpoly.
KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
static void p_LmFree(poly p, ring)
poly kBucketExtractLm(kBucket_pt bucket)
KINLINE void PrepareRed(BOOLEAN use_bucket)
static poly p_Copy(poly p, const ring r)
returns a copy of p
KINLINE void Tail_Mult_nn(number n)
KINLINE void LmDeleteAndIter()
KINLINE void SetLmTail(poly lm, poly new_p, int length, int use_bucket, ring r)
KINLINE sTObject(ring tailRing=currRing)
void p_Cleardenom_n(poly ph, const ring r, number &c)
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
static long p_GetExpDiff(poly p1, poly p2, int i, ring r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static poly p_Head(poly p, const ring r)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE TObject * S_2_T(int i)
void kBucketDestroy(kBucket_pt *bucket_pt)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
KINLINE void LmDeleteAndIter()
KINLINE BOOLEAN IsNull() const
KINLINE TObject * T_2(const skStrategy *strat)
KINLINE poly CanonicalizeP()
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl.cc )
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r)
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
#define pp_Test(p, lmRing, tailRing)
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
static long p_FDeg(const poly p, const ring r)
KINLINE void SetLmCurrRing()
static poly p_Mult_nn(poly p, number n, const ring r)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static unsigned pLength(poly a)
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...
KINLINE void pCleardenom()
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether)
static void p_Delete(poly *p, const ring r)
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
static number Init(long i, const coeffs r)
unsigned long p_GetShortExpVector(const poly p, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
poly(* pShallowCopyDeleteProc)(poly s_p, ring source_r, ring dest_r, omBin dest_bin)
returns a poly from dest_r which is a ShallowCopy of s_p from source_r assumes that source_r->N == de...
KINLINE poly GetLmCurrRing()
KINLINE long pTotalDeg() const
static BOOLEAN rField_is_Ring(const ring r)
KINLINE void Mult_nn(number n)
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
poly p_Last(const poly p, int &l, const ring r)
KINLINE poly GetLmTailRing()
KINLINE int SetLength(BOOLEAN lengt_pLength=FALSE)
KINLINE long SetDegStuffReturnLDeg()
static poly p_LmInit(poly p, const ring r)
static void p_Setm(poly p, const ring r)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
KINLINE TObject * s_2_t(int i)
static poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq, const poly spNoether, const ring r)
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring tailRing)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether)
KINLINE poly LmExtractAndIter()
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
KINLINE poly GetLm(ring r)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
int kBucketCanonicalize(kBucket_pt bucket)
static poly p_Init(const ring r, omBin bin)
KINLINE poly kNoetherTail()
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
void kBucketDeleteAndDestroy(kBucket_pt *bucket_pt)
KINLINE void T_1_2(const skStrategy *strat, TObject *&T_1, TObject *&T_2)
void p_ProjectiveUnique(poly ph, const ring r)
KINLINE long SetDegStuffReturnLDeg()
poly p_GetMaxExpP(poly p, const ring r)
return monomial r such that GetExp(r,i) is maximum of all monomials in p; coeff == 0...
KINLINE long pFDeg() const
KINLINE TObject * T_1(const skStrategy *strat)
KINLINE void ShallowCopyDelete(ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
KINLINE long GetpFDeg() const