13#if !defined(NO_KINLINE) || defined(KUTIL_CC)
49 if (
i >= 0 &&
i <=
sl)
52 if ((sri >= 0) && (sri <=
tl))
55 if ((t !=
NULL) && (t->p ==
S[
i]))
232 pGetCoeff(
p)=pGetCoeff(
t_p);
385 if (new_tailBin ==
NULL) new_tailBin = new_tailRing->PolyBin;
388 t_p = p_shallow_copy_delete(
t_p,
tailRing, new_tailRing, new_tailBin);
403 tailRing, new_tailRing, new_tailBin);
449 long d = this->
pLDeg();
491 number u=n_GetUnit(c,C);
497 number uInv = n_Invers(u, C);
511 number uInv = n_Invers(u, C);
515 if(!n_GreaterZero(pGetCoeff(
p),
tailRing->cf))
551 if (!n_GreaterZero(pGetCoeff(
p),
currRing->cf))
762 else if ((lmBin !=
NULL) && (lmBin !=
currRing->PolyBin))
785 p_shallow_copy_delete);
787 new_tailRing->PolyBin,p_shallow_copy_delete,
853 long d = this->
pLDeg();
860 long d = this->
pLDeg(use_last);
869 return bucket->buckets_length[
i] + 1;
962 poly t_p = p_LmInit(
p,
currRing, tailRing, tailBin);
970 poly
p = p_LmInit(t_p, tailRing,
currRing, lmBin);
987 p_LmFree(
p, tailRing);
1019 poly &m1, poly &m2,
const ring m_r)
1026 m1 = p_Init(m_r,m_r->PolyBin);
1027 m2 = p_Init(m_r,m_r->PolyBin);
1029 for (
i = p_r->N;
i;
i--)
1031 x = p_GetExpDiff(p1, p2,
i, p_r);
1034 if (
x > (
long) m_r->bitmask)
goto false_return;
1035 p_SetExp(m2,
i,
x, m_r);
1036 p_SetExp(m1,
i,0, m_r);
1040 if (-
x > (
long) m_r->bitmask)
goto false_return;
1041 p_SetExp(m1,
i,-
x, m_r);
1042 p_SetExp(m2,
i,0, m_r);
1061 poly &m1, poly &m2, poly &
lcm,
const ring tailRing)
1071 m1 = p_Init(tailRing,tailRing->PolyBin);
1072 m2 = p_Init(tailRing,tailRing->PolyBin);
1073 lcm = p_Init(leadRing,leadRing->PolyBin);
1075 for (
i = leadRing->N;
i>=0;
i--)
1077 e1 = p_GetExp(p1,
i,leadRing);
1078 e2 = p_GetExp(p2,
i,leadRing);
1082 p_SetExp(m2,
i,
x, tailRing);
1088 p_SetExp(m1,
i,-
x, tailRing);
1094 p_SetExp(
lcm,
i,
s, leadRing);
1097 p_Setm(m1, tailRing);
1098 p_Setm(m2, tailRing);
1099 p_Setm(
lcm, leadRing);
1113 rest = n_QuotRem(pGetCoeff(Red->p), pGetCoeff(red.p),
1117 assume(PR->GetLmCurrRing() != red.GetLmCurrRing());
1130 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1152 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1153 Red->HeadNormalize();
1181 return L.GetLmCurrRing();
1191 return L.GetLmCurrRing();
1201 return L.GetLmCurrRing();
1244 if(!n_DivBy(pGetCoeff(strat->
S[*at]), pGetCoeff(
p),
currRing->cf))
CanonicalForm normalize(const CanonicalForm &F)
normalize a poly, i.e. in char 0 clear denominators, remove integer content in char p divide by leadi...
KINLINE long SetDegStuffReturnLDeg()
KINLINE void Tail_Mult_nn(number n)
KINLINE void LmDeleteAndIter()
KINLINE TObject * T_2(const skStrategy *strat)
KINLINE void PrepareRed(BOOLEAN use_bucket)
KINLINE void CanonicalizeP()
KINLINE void SetLmTail(poly lm, poly new_p, int length, int use_bucket, ring r)
KINLINE void T_1_2(const skStrategy *strat, TObject *&T_1, TObject *&T_2)
KINLINE long pLDeg(BOOLEAN use_last)
KINLINE void Init(ring tailRing=currRing)
KINLINE TObject * T_1(const skStrategy *strat)
KINLINE int SetLength(BOOLEAN lengt_pLength=FALSE)
KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether)
KINLINE void ShallowCopyDelete(ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
KINLINE sLObject & operator=(const sTObject &)
KINLINE void SetShortExpVector()
KINLINE void HeadNormalize()
KINLINE poly GetP(omBin lmBin=(omBin) NULL)
KINLINE sLObject(ring tailRing=currRing)
KINLINE poly LmExtractAndIter()
KINLINE poly GetLm(ring r)
KINLINE poly GetLmCurrRing()
KINLINE void Init(ring r=currRing)
KINLINE void Mult_nn(number n)
KINLINE long SetDegStuffReturnLDeg()
KINLINE poly GetLmTailRing()
KINLINE void pCleardenom()
KINLINE long GetpFDeg() const
KINLINE sTObject(ring tailRing=currRing)
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
KINLINE void SetLmCurrRing()
KINLINE void LmDeleteAndIter()
KINLINE long pFDeg() const
KINLINE BOOLEAN IsNull() const
KINLINE void Set(ring r=currRing)
KINLINE long pTotalDeg() const
KINLINE poly kNoetherTail()
KINLINE TObject * s_2_t(int i)
KINLINE TObject * S_2_T(int i)
const CanonicalForm int s
CFArray copy(const CFList &list)
write elements of list into an array
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
KINLINE poly redtailBba_Ring(poly p, int pos, kStrategy strat)
void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r)
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring tailRing)
KINLINE int ksReducePolyTailLC_Z(LObject *PR, TObject *PW, LObject *Red)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether)
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
KINLINE TObject ** initR()
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
KINLINE int ksReducePolyTail(LObject *PR, TObject *PW, LObject *Red)
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
KINLINE int ksReducePolyTail_Z(LObject *PR, TObject *PW, LObject *Red)
KINLINE unsigned long * initsevT()
void kBucketDeleteAndDestroy(kBucket_pt *bucket_pt)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
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.
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)
poly kBucketExtractLm(kBucket_pt bucket)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
void kBucketNormalize(kBucket_pt bucket)
apply n_Normalize to all coefficients
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, poly *mon, kStrategy strat, BOOLEAN reduce)
void deleteInS(int i, kStrategy strat)
denominator_list_s * denominator_list
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
EXTERN_VAR denominator_list DENOMINATOR_LIST
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
The main handler for Singular numbers which are suitable for Singular polynomials.
#define TEST_OPT_CONTENTSB
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,...
void p_Cleardenom_n(poly ph, const ring r, number &c)
void p_SimpleContent(poly ph, int smax, const ring r)
void p_Norm(poly p1, const ring r)
unsigned long p_GetShortExpVector(const poly p, const ring r)
void p_ProjectiveUnique(poly ph, const ring r)
poly p_Last(const poly p, int &l, const ring r)
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
#define __p_Mult_nn(p, n, r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing).
#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 pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
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...
#define rField_is_Ring(R)
int p_mFirstVblock(poly p, const ring ri)