24#define TRANSEXT_PRIVATES
176 p->exp[o->
data.dp.place]=ord;
186 int *
w=o->
data.wp.weights;
188 for(
int i=a;
i<=e;
i++) ord+=((
unsigned long)
p_GetExp(
p,
i,r))*((
unsigned long)
w[
i-a]);
192 for(
int i=a;
i<=e;
i++)
202 p->exp[o->
data.wp.place]=ord;
208 const short a=o->
data.am.start;
209 const short e=o->
data.am.end;
210 const int *
w=o->
data.am.weights;
212 for(
short i=a;
i<=e;
i++,
w++)
217 for(
short i=a;
i<=e;
i++)
229 const short len_gen= o->
data.am.len_gen;
231 if ((c > 0) && (c <= len_gen))
238 p->exp[o->
data.am.place] = ord;
245 a=o->
data.wp64.start;
249 for(
int i=a;
i<=e;
i++)
270 Print(
"ai %lld, ord %lld\n",
ai,ord);
272 Print(
"ai %ld, ord %ld\n",
ai,ord);
287 #elif SIZEOF_LONG == 8
288 p->exp[o->
data.wp64.place]=ord;
302 int pl=o->
data.cp.place;
311 o->
data.syzcomp.Components);
313 o->
data.syzcomp.ShiftedComponents);
314 if (ShiftedComponents !=
NULL)
317 assume(c == 0 || Components[c] != 0);
318 sc = ShiftedComponents[Components[c]];
321 p->exp[o->
data.syzcomp.place]=
sc;
327 const short place = o->
data.syz.place;
328 const int limit = o->
data.syz.limit;
330 if (c > (
unsigned long)limit)
331 p->exp[place] = o->
data.syz.curr_index;
334 assume( (1 <= c) && (c <= (
unsigned long)limit) );
335 p->exp[place]= o->
data.syz.syz_index[c];
351 Print(
"p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);
p_wrp(
p, r);
360 const int*
const pVarOffset = o->
data.isTemp.pVarOffset;
365 for(
int i = 1;
i <= r->N;
i++ )
367 const int vo = pVarOffset[
i];
377 for(
int i = 1;
i <= r->N;
i++ )
379 const int vo = pVarOffset[
i];
399 Print(
"p_Setm_General: ro_is ord: pos: %d, p: ", pos);
p_wrp(
p, r);
409 const int limit = o->
data.is.limit;
411 const int start = o->
data.is.start;
413 if( F !=
NULL && c > limit )
417 Print(
"p_Setm_General: ro_is : in rSetm: pos: %d, c: %d > limit: %d\n", c, pos, limit);
418 PrintS(
"preComputed Values: ");
437 const poly
pp = F->m[c];
446 Print(
"Respective F[c - %d: %d] pp: ", limit, c);
451 const int end = o->
data.is.end;
459 Print(
"p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start,
p->exp[start]);
465 for(
int i = start;
i <= end;
i++)
466 p->exp[
i] +=
pp->exp[
i];
469 if (r->NegWeightL_Offset !=
NULL)
471 for (
int i=r->NegWeightL_Size-1;
i>=0;
i--)
473 const int _i = r->NegWeightL_Offset[
i];
474 if( start <=
_i &&
_i <= end )
481 const int*
const pVarOffset = o->
data.is.pVarOffset;
485 for(
int i = 1;
i <= r->N;
i++ )
487 const int vo = pVarOffset[
i];
501 const int*
const pVarOffset = o->
data.is.pVarOffset;
506 const int vo = pVarOffset[0];
512 Print(
"ELSE p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit,
vo,
p->exp[
vo]);
525 if (pos == r->OrdSize)
return;
566 if (r->typ[0].ord_typ ==
ro_dp &&
567 r->typ[0].data.dp.start == 1 &&
568 r->typ[0].data.dp.end == r->N &&
569 r->typ[0].data.dp.place == r->pOrdIndex)
571 if (r->typ[0].ord_typ ==
ro_wp &&
572 r->typ[0].data.wp.start == 1 &&
573 r->typ[0].data.wp.end == r->N &&
574 r->typ[0].data.wp.place == r->pOrdIndex &&
575 r->typ[0].data.wp.weights == r->firstwv)
600 for (
i=1;
i<= r->firstBlockEnds;
i++)
619 for (
i=0;r->order[
i]!=0;
i++)
708 if ((r->firstwv==
NULL) || (
i>r->firstBlockEnds))
712 return r->firstwv[
i-1];
722 for(
i=1;
i<=r->firstBlockEnds;
i++)
763 return r->pFDeg(
p, r);
816 long o = r->pFDeg(
p, r);
892 if ((t=r->pFDeg(
p, r))>
max)
max=t;
902 if ((t=r->pFDeg(
p, r))>
max)
max=t;
1107static inline unsigned long
1111 const unsigned long bitmask = r->bitmask;
1112 unsigned long ml1 =
l1 & bitmask;
1113 unsigned long ml2 =
l2 & bitmask;
1119 unsigned long mask = bitmask << r->BitsPerExp;
1133static inline unsigned long
1148 unsigned long divmask = r->divmask;
1152 offset = r->VarL_Offset[0];
1160 for (
i=1;
i<r->VarL_Size;
i++)
1178 unsigned long l_p, divmask = r->divmask;
1183 l_p =
p->exp[r->VarL_Offset[0]];
1187 for (
i=1;
i<r->VarL_Size;
i++)
1189 l_p =
p->exp[r->VarL_Offset[
i]];
1258 if((
k!=-1)&&(
k!=
i))
return 0;
1275 for(
i=r->N;
i>0;
i--)
1384 while (*
s!=
'\0')
s++;
1398 if (((
unsigned long)
i) > r->bitmask/2)
1429 for(
unsigned int k = iFirstAltVar;
k <= iLastAltVar;
k++)
1446 char *
sst=(
char*)
st;
1499 for(
i=(
int)r->N;
i;
i--)
1591 WerrorS(
"p_DivideM not implemented for non-commuative rings");
1649 for(
int i = (
int)
rVar(r);
i>0;
i--)
1661 for (
int i=r->N;
i; --
i)
1689 for (
int i = r->real_var_end;
i>=r->real_var_start;
i--)
1756 poly *C = (poly *)
omAlloc0((len+1)*
sizeof(poly));
1757 poly *LM = (poly *)
omAlloc0((len+1)*
sizeof(poly));
1766 int is = r->real_var_start - 1;
2095 int e,
h = (
exp >> 1) + 1;
2115 poly tail,
b,
res,
h;
2128 al = (
exp + 1) *
sizeof(poly);
2131 for (e=1; e<
exp; e++)
2137 for (e=
exp-1; e>
eh; e--)
2146 for (e=
eh; e!=0; e--)
2213 if ( (
i > 0) && ((
unsigned long )
i > (r->bitmask))
2219 Werror(
"exponent %d is too large, max. is %ld",
i,r->bitmask);
2357#define CLEARENUMERATORS 1
2485 h =
n_Init(1, r->cf->extRing->cf);
2899#if 0 && CLEARENUMERATORS
3218 if (!
n_IsOne (n, C->extRing->cf))
3260 if (r->cf->has_simple_Alloc)
3337 if (d(
qp,r) != o)
return FALSE;
3428 if ((*len == 0) || (
j<*len))
3442 unsigned long kk=(
unsigned long)
k;
3570 if (*
p==
NULL)
return;
3626 if (
k>len) {
Werror(
"wrong rank:%d, should be %d",len,
k); }
3635 for(
int i=len-1;
i>=0;
i--)
3649 if (*len==0) *len=1;
3650 *
p=(poly*)
omAlloc((*len)*
sizeof(poly));
3689 if ((c>0) && ((r->pModW)->range(c-1))) d+= (*(r->pModW))[c-1];
3703 r->pLexOrder =
TRUE;
3763 if (r->cf->ch>32003)
4052 PrintS(
"\nSource Ring: \n");
4062 PrintS(
"\nDestination Ring: \n");
4104 WarnS(
"Not defined: Cannot map a rational fraction and make a polynomial out of it! Ignoring the denominator.");
4110 WerrorS(
"Number permutation is not implemented for this data yet!");
4244 const int par = -perm[
i];
4250 const ring R = C->extRing;
4556 p=
p_JetW(
p_Mult_q(
p,
p_Invers(n-
p_MinDeg(
p,
w,
R),u,
w,
R),
R),n,
ww,
R);
4564 while ((p1 !=
NULL) && (p2 !=
NULL))
4583 int i =
r1->ExpL_Size;
4587 unsigned long *
ep = p1->exp;
4588 unsigned long *
eq = p2->exp;
4605 while ((p1 !=
NULL) && (p2 !=
NULL))
4646 while ((p1 !=
NULL) )
4708 if (
m==
NULL)
return 0;
4734 if (
p ==
NULL)
return -1;
4741 while ((
l < (
rVar(r))) && (
lex == 0))
4799 const unsigned int s,
const unsigned int n)
4802 unsigned long ev = 0L;
4833 unsigned long ev = 0;
4848 for (;
j<=r->N;
j++)
4885 unsigned long ev = 0;
4901 unsigned long ev = 0;
4936#define p_Delete__T p_ShallowDelete
4938#define n_Delete__T(n, r) do {} while (0)
4949 if ((r==0)&&(a!=
NULL))
5003 for(
unsigned j=r->N;
j!=0;
j--)
5024 memcpy(np->exp,
p->exp, r->ExpL_Size*
sizeof(
long));
Concrete implementation of enumerators over polynomials.
static int si_max(const int a, const int b)
static int si_min(const int a, const int b)
const CanonicalForm CFMap CFMap & N
poly singclap_pdivide(poly f, poly g, const ring r)
This is a polynomial enumerator for simple iteration over coefficients of polynomials.
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static FORCE_INLINE number n_Param(const int iParameter, const coeffs r)
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1....
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE number n_NormalizeHelper(number a, number b, const coeffs r)
assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,...
static FORCE_INLINE number n_GetDenom(number &n, const coeffs r)
return the denominator of n (if elements of r are by nature not fractional, result is 1)
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
number ndCopyMap(number a, const coeffs src, const coeffs dst)
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
static FORCE_INLINE BOOLEAN n_IsUnit(number n, const coeffs r)
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
static FORCE_INLINE number n_ExactDiv(number a, number b, const coeffs r)
assume that there is a canonical subring in cf and we know that division is possible for these a and ...
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static FORCE_INLINE number n_Farey(number a, number b, const coeffs r)
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static FORCE_INLINE int n_Size(number n, const coeffs r)
return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used fo...
static FORCE_INLINE number n_GetUnit(number n, const coeffs r)
in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k i...
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
static FORCE_INLINE void n_ClearDenominators(ICoeffsEnumerator &numberCollectionEnumerator, number &d, const coeffs r)
(inplace) Clears denominators on a collection of numbers number d is the LCM of all the coefficient d...
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static FORCE_INLINE number n_ChineseRemainderSym(number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Q_a(const coeffs r)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE void n_ClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
Computes the content and (inplace) divides it out on a collection of numbers number c is the content ...
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:...
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
static FORCE_INLINE const char * n_Read(const char *s, number *a, const coeffs r)
!!! Recommendation: This method is too cryptic to be part of the user- !!! interface....
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
static FORCE_INLINE number n_GetNumerator(number &n, const coeffs r)
return the numerator of n (if elements of r are by nature not fractional, result is n)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
const CanonicalForm int s
const CanonicalForm int const CFList const Variable & y
CanonicalForm subst(const CanonicalForm &f, const CFList &a, const CFList &b, const CanonicalForm &Rstar, bool isFunctionField)
const Variable & v
< [in] a sqrfree bivariate poly
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
static int max(int a, int b)
void WerrorS(const char *s)
const char * eati(const char *s, int *i)
static bool rIsSCA(const ring r)
poly nc_pSubst(poly p, int n, poly e, const ring r)
substitute the n-th variable by e in p destroy p e is not a constant
LINLINE number nlAdd(number la, number li, const coeffs r)
LINLINE number nlSub(number la, number li, const coeffs r)
LINLINE void nlDelete(number *a, const coeffs r)
BOOLEAN nlGreaterZero(number za, const coeffs r)
number nlGcd(number a, number b, const coeffs r)
void nlNormalize(number &x, const coeffs r)
int dReportError(const char *fmt,...)
#define p_LmCheckPolyRing1(p, r)
#define p_LmCheckPolyRing2(p, r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define POLY_NEGWEIGHT_OFFSET
#define __p_GetComp(p, r)
#define p_SetRingOfLm(p, r)
#define rRing_has_Comp(r)
gmp_float exp(const gmp_float &a)
The main handler for Singular numbers which are suitable for Singular polynomials.
number ndGcd(number, number, const coeffs r)
void ndNormalize(number &, const coeffs)
#define omFreeSize(addr, size)
#define omReallocSize(addr, o_size, size)
#define omTypeAllocBin(type, addr, bin)
#define TEST_OPT_INTSTRATEGY
#define TEST_OPT_CONTENTSB
poly p_Diff(poly a, int k, const ring r)
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,...
poly p_DivideM(poly a, poly b, const ring r)
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
void p_Setm_WFirstTotalDegree(poly p, const ring r)
poly pp_Jet(poly p, int m, const ring R)
STATIC_VAR pLDegProc pOldLDeg
void p_Cleardenom_n(poly ph, const ring r, number &c)
long pLDegb(poly p, int *l, const ring r)
long pLDeg1_Totaldegree(poly p, int *l, const ring r)
long p_WFirstTotalDegree(poly p, const ring r)
poly p_Farey(poly p, number N, const ring r)
long pLDeg1_WFirstTotalDegree(poly p, int *l, const ring r)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
long pLDeg1c_WFirstTotalDegree(poly p, int *l, const ring r)
poly n_PermNumber(const number z, const int *par_perm, const int, const ring src, const ring dst)
static poly p_DiffOpM(poly a, poly b, BOOLEAN multiply, const ring r)
poly p_PolyDiv(poly &p, const poly divisor, const BOOLEAN needResult, const ring r)
assumes that p and divisor are univariate polynomials in r, mentioning the same variable; assumes div...
int p_Size(poly p, const ring r)
void p_Setm_Dummy(poly p, const ring r)
static poly p_Invers(int n, poly u, intvec *w, const ring R)
poly p_GcdMon(poly f, poly g, const ring r)
polynomial gcd for f=mon
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
int p_LowVar(poly p, const ring r)
the minimal index of used variables - 1
BOOLEAN p_DivisibleByRingCase(poly f, poly g, const ring r)
divisibility check over ground ring (which may contain zero divisors); TRUE iff LT(f) divides LT(g),...
poly p_Homogen(poly p, int varnum, const ring r)
poly p_Subst(poly p, int n, poly e, const ring r)
static BOOLEAN p_ExpVectorEqual(poly p1, poly p2, const ring r1, const ring r2)
BOOLEAN p_HasNotCF(poly p1, poly p2, const ring r)
void p_Content(poly ph, const ring r)
int p_Weight(int i, const ring r)
void p_Setm_TotalDegree(poly p, const ring r)
poly p_CopyPowerProduct(const poly p, const ring r)
like p_Head, but with coefficient 1
poly pp_DivideM(poly a, poly b, const ring r)
STATIC_VAR int _componentsExternal
void p_SimpleContent(poly ph, int smax, const ring r)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
STATIC_VAR long * _componentsShifted
void p_Vec2Polys(poly v, poly **p, int *len, const ring r)
static poly p_Subst0(poly p, int n, const ring r)
poly p_DiffOp(poly a, poly b, BOOLEAN multiply, const ring r)
static unsigned long p_GetMaxExpL2(unsigned long l1, unsigned long l2, const ring r, unsigned long number_of_exp)
poly p_Jet(poly p, int m, const ring R)
poly p_TakeOutComp(poly *p, int k, const ring r)
long pLDeg1c_Deg(poly p, int *l, const ring r)
long pLDeg1(poly p, int *l, const ring r)
static number * pnBin(int exp, const ring r)
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
static void pnFreeBin(number *bin, int exp, const coeffs r)
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
poly p_Power(poly p, int i, const ring r)
poly p_Div_nn(poly p, const number n, const ring r)
void p_Normalize(poly p, const ring r)
unsigned long p_GetShortExpVector0(const poly p, const ring r)
void p_DeleteComp(poly *p, int k, const ring r)
poly p_mInit(const char *st, BOOLEAN &ok, const ring r)
poly p_MDivide(poly a, poly b, const ring r)
void p_ContentRat(poly &ph, const ring r)
void p_Norm(poly p1, const ring r)
poly p_Div_mm(poly p, const poly m, const ring r)
divide polynomial by monomial
poly pp_Jet0(poly p, const ring R)
int p_GetVariables(poly p, int *e, const ring r)
set entry e[i] to 1 if var(i) occurs in p, ignore var(j) if e[j]>0 return #(e[i]>0)
int p_MinDeg(poly p, intvec *w, const ring R)
int p_MaxExpPerVar(poly p, int i, const ring r)
max exponent of variable x_i in p
STATIC_VAR BOOLEAN pOldLexOrder
int p_Compare(const poly a, const poly b, const ring R)
void p_Setm_Syz(poly p, ring r, int *Components, long *ShiftedComponents)
STATIC_VAR pFDegProc pOldFDeg
void p_LmDeleteAndNextRat(poly *p, int ishift, ring r)
unsigned long p_GetShortExpVector(const poly p, const ring r)
BOOLEAN p_IsHomogeneousW(poly p, const intvec *w, const ring r)
long pLDeg1_Deg(poly p, int *l, const ring r)
poly p_Series(int n, poly p, poly u, intvec *w, const ring R)
void p_ProjectiveUnique(poly ph, const ring r)
long p_WTotaldegree(poly p, const ring r)
long p_DegW(poly p, const int *w, const ring R)
p_SetmProc p_GetSetmProc(const ring r)
void p_Setm_General(poly p, const ring r)
BOOLEAN p_OneComp(poly p, const ring r)
return TRUE if all monoms have the same component
poly p_Cleardenom(poly p, const ring r)
long pLDeg1c(poly p, int *l, const ring r)
void p_Split(poly p, poly *h)
long pLDeg1c_Totaldegree(poly p, int *l, const ring r)
poly p_GetCoeffRat(poly p, int ishift, ring r)
BOOLEAN p_VectorHasUnitB(poly p, int *k, const ring r)
long pLDeg0c(poly p, int *l, const ring r)
poly p_Vec2Poly(poly v, int k, const ring r)
poly p_LcmRat(const poly a, const poly b, const long lCompM, const ring r)
unsigned long p_GetMaxExpL(poly p, const ring r, unsigned long l_max)
return the maximal exponent of p in form of the maximal long var
static poly p_TwoMonPower(poly p, int exp, const ring r)
void p_SetModDeg(intvec *w, ring r)
BOOLEAN p_HasNotCFRing(poly p1, poly p2, const ring r)
long pLDeg0(poly p, int *l, const ring r)
int p_Var(poly m, const ring r)
poly p_Sub(poly p1, poly p2, const ring r)
void p_VectorHasUnit(poly p, int *k, int *len, const ring r)
static void p_SplitAndReversePoly(poly p, int n, poly *non_zero, poly *zero, const ring r)
int p_IsUnivariate(poly p, const ring r)
return i, if poly depends only on var(i)
STATIC_VAR int * _components
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
void pEnlargeSet(poly **p, int l, int increment)
long p_WDegree(poly p, const ring r)
static long pModDeg(poly p, ring r)
BOOLEAN p_IsHomogeneous(poly p, const ring r)
poly p_Head0(const poly p, const ring r)
like p_Head, but allow NULL coeff
static poly p_MonMultC(poly p, poly q, const ring rr)
unsigned long p_GetShortExpVector1(const poly p, const ring r)
static poly p_Pow_charp(poly p, int i, const ring r)
poly pp_JetW(poly p, int m, int *w, const ring R)
long p_Deg(poly a, const ring r)
static poly p_Subst1(poly p, int n, const ring r)
poly p_Last(const poly p, int &l, const ring r)
poly p_CopyPowerProduct0(const poly p, number n, const ring r)
like p_Head, but with coefficient n
static void p_MonMult(poly p, poly q, const ring r)
number p_InitContent(poly ph, const ring r)
void p_Vec2Array(poly v, poly *p, int len, const ring r)
vector to already allocated array (len>=p_MaxComp(v,r))
static poly p_MonPower(poly p, int exp, const ring r)
void p_ContentForGB(poly ph, const ring r)
static poly p_Subst2(poly p, int n, number e, const ring r)
void p_Lcm(const poly a, const poly b, poly m, const ring r)
static unsigned long GetBitFields(const long e, const unsigned int s, const unsigned int n)
poly p_ChineseRemainder(poly *xx, number *x, number *q, int rl, CFArray &inv_cache, const ring R)
const char * p_Read(const char *st, poly &rc, const ring r)
poly p_JetW(poly p, int m, int *w, const ring R)
BOOLEAN p_EqualPolys(poly p1, poly p2, const ring r)
static poly p_Pow(poly p, int i, const ring r)
static poly p_Neg(poly p, const ring r)
static int pLength(poly a)
static void p_ExpVectorSum(poly pr, poly p1, poly p2, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static void p_LmDelete(poly p, const ring r)
static poly p_Mult_q(poly p, poly q, const ring r)
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
static unsigned long p_SubComp(poly p, unsigned long v, ring r)
static long p_AddExp(poly p, int v, long ee, ring r)
static poly p_LmInit(poly p, const ring r)
#define p_LmEqual(p1, p2, r)
static int p_Cmp(poly p1, poly p2, ring r)
void p_Write(poly p, ring lmRing, ring tailRing)
static void p_SetExpV(poly p, int *ev, const ring r)
static int p_Comp_k_n(poly a, poly b, int k, ring r)
static void p_SetCompP(poly p, int i, 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 @Note: VarOffset encodes the position in p->exp
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static long p_IncrExp(poly p, int v, ring r)
static void p_ExpVectorSub(poly p1, poly p2, const ring r)
static unsigned long p_AddComp(poly p, unsigned long v, ring r)
static void p_Setm(poly p, const ring r)
static number p_SetCoeff(poly p, number n, ring r)
static poly pReverse(poly p)
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
static poly p_Head(const poly p, const ring r)
copy the (leading) term of p
static int p_LmCmp(poly p, poly q, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static long p_MultExp(poly p, int v, long ee, ring r)
static BOOLEAN p_IsConstant(const poly p, const ring r)
static poly p_GetExp_k_n(poly p, int l, int k, const ring r)
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
static void p_Delete(poly *p, const ring r)
static long p_DecrExp(poly p, int v, ring r)
static void p_GetExpV(poly p, int *ev, const ring r)
BOOLEAN p_CheckPolyRing(poly p, ring r)
static long p_GetOrder(poly p, ring r)
static poly p_LmFreeAndNext(poly p, ring)
static poly p_Mult_mm(poly p, poly m, const ring r)
static void p_LmFree(poly p, ring)
static poly p_Init(const ring r, omBin bin)
static poly p_LmDeleteAndNext(poly p, const ring r)
static poly p_SortAdd(poly p, const ring r, BOOLEAN revert=FALSE)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static long p_Totaldegree(poly p, const ring r)
#define __p_Mult_nn(p, n, r)
void p_wrp(poly p, ring lmRing, ring tailRing)
poly singclap_gcd(poly f, poly g, const ring r)
polynomial gcd via singclap_gcd_r resp. idSyzygies destroys f and g
void PrintS(const char *s)
void Werror(const char *fmt,...)
BOOLEAN rOrd_SetCompRequiresSetm(const ring r)
return TRUE if p_SetComp requires p_Setm
void rWrite(ring r, BOOLEAN details)
int r_IsRingVar(const char *n, char **names, int N)
BOOLEAN rSamePolyRep(ring r1, ring r2)
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analo...
static BOOLEAN rField_is_Zp_a(const ring r)
static BOOLEAN rField_is_Z(const ring r)
static BOOLEAN rField_is_Zp(const ring r)
void(* p_SetmProc)(poly p, const ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
long(* pFDegProc)(poly p, ring r)
static int rGetCurrSyzLimit(const ring r)
long(* pLDegProc)(poly p, int *length, ring r)
static BOOLEAN rIsRatGRing(const ring r)
static int rPar(const ring r)
(r->cf->P)
static int rInternalChar(const ring r)
static BOOLEAN rIsLPRing(const ring r)
@ ringorder_a64
for int64 weights
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
@ ringorder_IS
Induced (Schreyer) ordering.
static BOOLEAN rField_is_Q_a(const ring r)
static BOOLEAN rField_is_Q(const ring r)
static BOOLEAN rField_has_Units(const ring r)
static BOOLEAN rIsNCRing(const ring r)
static BOOLEAN rIsSyzIndexRing(const ring r)
static BOOLEAN rField_is_GF(const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
#define rField_is_Ring(R)
void sBucket_Add_m(sBucket_pt bucket, poly p)
sBucket_pt sBucketCreate(const ring r)
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
static short scaLastAltVar(ring r)
static short scaFirstAltVar(ring r)
poly p_LPSubst(poly p, int n, poly e, const ring r)
int status int void size_t count
number ntInit(long i, const coeffs cf)
int * iv2array(intvec *iv, const ring R)
long totaldegreeWecart_IV(poly p, ring r, const int *w)