 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
|
poly | p_Farey (poly p, number N, const ring r) |
|
poly | p_ChineseRemainder (poly *xx, number *x, number *q, int rl, CFArray &inv_cache, const ring R) |
|
void | p_Setm_General (poly p, const ring r) |
|
void | p_Setm_Syz (poly p, ring r, int *Components, long *ShiftedComponents) |
|
void | p_Setm_Dummy (poly p, const ring r) |
|
void | p_Setm_TotalDegree (poly p, const ring r) |
|
void | p_Setm_WFirstTotalDegree (poly p, const ring r) |
|
p_SetmProc | p_GetSetmProc (const ring r) |
|
long | p_Deg (poly a, const ring r) |
|
long | p_WFirstTotalDegree (poly p, const ring r) |
|
long | p_WTotaldegree (poly p, const ring r) |
|
long | p_DegW (poly p, const short *w, const ring R) |
|
int | p_Weight (int i, const ring r) |
|
long | p_WDegree (poly p, const ring r) |
|
long | pLDeg0 (poly p, int *l, const ring r) |
|
long | pLDeg0c (poly p, int *l, const ring r) |
|
long | pLDegb (poly p, int *l, const ring r) |
|
long | pLDeg1 (poly p, int *l, const ring r) |
|
long | pLDeg1c (poly p, int *l, const ring r) |
|
long | pLDeg1_Deg (poly p, int *l, const ring r) |
|
long | pLDeg1c_Deg (poly p, int *l, const ring r) |
|
long | pLDeg1_Totaldegree (poly p, int *l, const ring r) |
|
long | pLDeg1c_Totaldegree (poly p, int *l, const ring r) |
|
long | pLDeg1_WFirstTotalDegree (poly p, int *l, const ring r) |
|
long | pLDeg1c_WFirstTotalDegree (poly p, int *l, const ring r) |
|
static unsigned long | p_GetMaxExpL2 (unsigned long l1, unsigned long l2, const ring r, unsigned long number_of_exp) |
|
static unsigned long | p_GetMaxExpL2 (unsigned long l1, unsigned long l2, 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, next == NULL, ord is not set More...
|
|
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 More...
|
|
BOOLEAN | p_OneComp (poly p, const ring r) |
| return TRUE if all monoms have the same component More...
|
|
int | p_IsPurePower (const poly p, const ring r) |
| return i, if head depends only on var(i) More...
|
|
int | p_IsUnivariate (poly p, const ring r) |
| return i, if poly depends only on var(i) More...
|
|
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) More...
|
|
poly | p_ISet (long i, const ring r) |
| returns the poly representing the integer i More...
|
|
poly | p_One (const ring r) |
|
void | p_Split (poly p, poly *h) |
|
BOOLEAN | p_HasNotCF (poly p1, poly p2, const ring r) |
|
BOOLEAN | p_HasNotCFRing (poly p1, poly p2, const ring r) |
|
const char * | p_Read (const char *st, poly &rc, const ring r) |
|
poly | p_mInit (const char *st, BOOLEAN &ok, const ring r) |
|
poly | p_NSet (number n, const ring r) |
| returns the poly representing the number n, destroys n More...
|
|
poly | p_MDivide (poly a, poly b, const ring r) |
|
poly | p_Div_nn (poly p, const number n, const ring r) |
|
poly | p_Div_mm (poly p, const poly m, const ring r) |
| divide polynomial by monomial More...
|
|
poly | p_DivideM (poly a, poly b, const ring r) |
|
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), i.e., LT(f)*c*m = LT(g), for some coefficient c and some monomial m; does not take components into account More...
|
|
void | p_Lcm (const poly a, const poly b, poly m, const ring r) |
|
poly | p_Lcm (const poly a, const poly b, const ring r) |
|
poly | p_LcmRat (const poly a, const poly b, const long lCompM, const ring r) |
|
void | p_LmDeleteAndNextRat (poly *p, int ishift, ring r) |
|
poly | p_GetCoeffRat (poly p, int ishift, ring r) |
|
void | p_ContentRat (poly &ph, 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 divisor != NULL; p may be NULL; assumes a global monomial ordering in r; performs polynomial division of p by divisor: More...
|
|
poly | p_Diff (poly a, int k, const ring r) |
|
static poly | p_DiffOpM (poly a, poly b, BOOLEAN multiply, const ring r) |
|
poly | p_DiffOp (poly a, poly b, BOOLEAN multiply, const ring r) |
|
poly | p_Sub (poly p1, poly p2, const ring r) |
|
static poly | p_MonPower (poly p, int exp, const ring r) |
|
static void | p_MonMult (poly p, poly q, const ring r) |
|
static poly | p_MonMultC (poly p, poly q, const ring rr) |
|
static number * | pnBin (int exp, const ring r) |
|
static void | pnFreeBin (number *bin, int exp, const coeffs r) |
|
static poly | p_TwoMonPower (poly p, int exp, const ring r) |
|
static poly | p_Pow (poly p, int i, const ring r) |
|
static poly | p_Pow_charp (poly p, int i, const ring r) |
|
poly | p_Power (poly p, int i, const ring r) |
|
void | p_Content (poly ph, const ring r) |
|
void | p_ContentForGB (poly ph, const ring r) |
|
void | p_SimpleContent (poly ph, int smax, const ring r) |
|
number | p_InitContent (poly ph, const ring r) |
|
poly | p_Cleardenom (poly p, const ring r) |
|
void | p_Cleardenom_n (poly ph, const ring r, number &c) |
|
void | p_ProjectiveUnique (poly ph, const ring r) |
|
int | p_Size (poly p, const ring r) |
|
poly | p_Homogen (poly p, int varnum, const ring r) |
|
BOOLEAN | p_IsHomogeneous (poly p, const ring r) |
|
BOOLEAN | p_VectorHasUnitB (poly p, int *k, const ring r) |
|
void | p_VectorHasUnit (poly p, int *k, int *len, const ring r) |
|
poly | p_TakeOutComp1 (poly *p, int k, const ring r) |
|
poly | p_TakeOutComp (poly *p, int k, const ring r) |
|
void | p_TakeOutComp (poly *r_p, long comp, poly *r_q, int *lq, const ring r) |
|
void | p_DeleteComp (poly *p, int k, const ring r) |
|
poly | p_Vec2Poly (poly v, int k, 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)) More...
|
|
void | p_Vec2Polys (poly v, poly **p, int *len, const ring r) |
|
void | pSetDegProcs (ring r, pFDegProc new_FDeg, pLDegProc new_lDeg) |
|
void | pRestoreDegProcs (ring r, pFDegProc old_FDeg, pLDegProc old_lDeg) |
|
static long | pModDeg (poly p, ring r) |
|
void | p_SetModDeg (intvec *w, ring r) |
|
void | pEnlargeSet (poly **p, int l, int increment) |
|
void | p_Norm (poly p1, const ring r) |
|
void | p_Normalize (poly p, const ring r) |
|
static void | p_SplitAndReversePoly (poly p, int n, poly *non_zero, poly *zero, const ring r) |
|
static poly | p_Subst1 (poly p, int n, const ring r) |
|
static poly | p_Subst2 (poly p, int n, number e, const ring r) |
|
static poly | p_Subst0 (poly p, int n, const ring r) |
|
poly | p_Subst (poly p, int n, poly e, const ring r) |
|
poly | n_PermNumber (const number z, const int *par_perm, const int, const ring src, const ring dst) |
|
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 | pp_Jet (poly p, int m, const ring R) |
|
poly | p_Jet (poly p, int m, const ring R) |
|
poly | pp_JetW (poly p, int m, short *w, const ring R) |
|
poly | p_JetW (poly p, int m, short *w, const ring R) |
|
int | p_MinDeg (poly p, intvec *w, const ring R) |
|
static poly | p_Invers (int n, poly u, intvec *w, const ring R) |
|
poly | p_Series (int n, poly p, poly u, intvec *w, const ring R) |
|
BOOLEAN | p_EqualPolys (poly p1, poly p2, const ring r) |
|
static BOOLEAN | p_ExpVectorEqual (poly p1, poly p2, const ring r1, const ring r2) |
|
BOOLEAN | p_EqualPolys (poly p1, poly p2, const ring r1, const ring r2) |
| same as the usual p_EqualPolys for polys belonging to equal rings More...
|
|
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 More...
|
|
poly | p_Last (const poly p, int &l, const ring r) |
|
int | p_Var (poly m, const ring r) |
|
int | p_LowVar (poly p, const ring r) |
| the minimal index of used variables - 1 More...
|
|
void | p_Shift (poly *p, int i, const ring r) |
| shifts components of the vector p by i More...
|
|
static unsigned long | GetBitFields (const long e, const unsigned int s, const unsigned int n) |
|
unsigned long | p_GetShortExpVector (const poly p, const ring r) |
|
unsigned long | p_GetShortExpVector (const poly p, const poly pp, const ring r) |
| p_GetShortExpVector of p * pp More...
|
|
int | p_Compare (const poly a, const poly b, const ring R) |
|
poly | p_GcdMon (poly f, poly g, const ring r) |
| polynomial gcd for f=mon More...
|
|
poly | p_CopyPowerProduct (poly p, const ring r) |
| like p_Head, but with coefficient 1 More...
|
|
◆ CLEARENUMERATORS
#define CLEARENUMERATORS 1 |
◆ LINKAGE
◆ MYTEST
◆ n_Delete__T
#define n_Delete__T |
( |
|
n, |
|
|
|
r |
|
) |
| do {} while (0) |
◆ p_Delete__T
◆ Sy_bit_L
#define Sy_bit_L |
( |
|
x | ) |
(((unsigned long)1L)<<(x)) |
◆ TRANSEXT_PRIVATES
#define TRANSEXT_PRIVATES |
◆ GetBitFields()
static unsigned long GetBitFields |
( |
const long |
e, |
|
|
const unsigned int |
s, |
|
|
const unsigned int |
n |
|
) |
| |
|
inlinestatic |
Definition at line 4649 of file p_polys.cc.
4657 #define Sy_bit_L(x) (((unsigned long)1L)<<(x))
4659 unsigned long ev = 0L;
◆ n_PermNumber()
Definition at line 3930 of file p_polys.cc.
3931 :
this only works
for Frank
's alg. & trans. fields
3933 poly n_PermNumber(const number z, const int *par_perm, const int , const ring src, const ring dst)
3936 PrintS("\nSource Ring: \n");
3941 number zz = n_Copy(z, src->cf);
3942 PrintS("z: "); n_Write(zz, src);
3943 n_Delete(&zz, src->cf);
3946 PrintS("\nDestination Ring: \n");
3949 /*Print("\nOldPar: %d\n", OldPar);
3950 for( int i = 1; i <= OldPar; i++ )
3952 Print("par(%d) -> par/var (%d)\n", i, par_perm[i-1]);
3958 const coeffs srcCf = src->cf;
3959 assume( srcCf != NULL );
3961 assume( !nCoeff_is_GF(srcCf) );
3962 assume( src->cf->extRing!=NULL );
3966 const ring srcExtRing = srcCf->extRing;
3967 assume( srcExtRing != NULL );
3969 const coeffs dstCf = dst->cf;
3970 assume( dstCf != NULL );
3972 if( nCoeff_is_algExt(srcCf) ) // nCoeff_is_GF(srcCf)?
3975 if( zz == NULL ) return NULL;
3977 else if (nCoeff_is_transExt(srcCf))
3981 zz = NUM((fraction)z);
3982 p_Test (zz, srcExtRing);
3984 if( zz == NULL ) return NULL;
3985 if( !DENIS1((fraction)z) )
3987 if (!p_IsConstant(DEN((fraction)z),srcExtRing))
3988 WarnS("Not defined: Cannot map a rational fraction and make a polynomial out of it! Ignoring the denominator.");
3994 WerrorS("Number permutation is not implemented for this data yet!");
3998 assume( zz != NULL );
3999 p_Test (zz, srcExtRing);
4001 nMapFunc nMap = n_SetMap(srcExtRing->cf, dstCf);
4003 assume( nMap != NULL );
4006 if ((par_perm == NULL) && (rPar(dst) != 0 && rVar (srcExtRing) > 0))
4009 perm=(int *)omAlloc0((rVar(srcExtRing)+1)*sizeof(int));
4010 for(int i=si_min(rVar(srcExtRing),rPar(dst));i>0;i--)
4012 qq = p_PermPoly(zz, perm, srcExtRing, dst, nMap, NULL, rVar(srcExtRing)-1);
4013 omFreeSize ((ADDRESS)perm, (rVar(srcExtRing)+1)*sizeof(int));
4016 qq = p_PermPoly(zz, par_perm-1, srcExtRing, dst, nMap, NULL, rVar (srcExtRing)-1);
4018 if(nCoeff_is_transExt(srcCf)
4019 && (!DENIS1((fraction)z))
4020 && p_IsConstant(DEN((fraction)z),srcExtRing))
4022 number n=nMap(pGetCoeff(DEN((fraction)z)),srcExtRing->cf, dstCf);
4023 qq=p_Div_nn(qq,n,dst);
4025 p_Normalize(qq,dst);
◆ p_ChineseRemainder()
poly p_ChineseRemainder |
( |
poly * |
xx, |
|
|
number * |
x, |
|
|
number * |
q, |
|
|
int |
rl, |
|
|
CFArray & |
inv_cache, |
|
|
const ring |
R |
|
) |
| |
◆ p_Cleardenom()
poly p_Cleardenom |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 2788 of file p_polys.cc.
2798 #if CLEARENUMERATORS
2841 #if 0 && CLEARENUMERATORS
2885 #ifdef HAVE_RATGRING
◆ p_Cleardenom_n()
void p_Cleardenom_n |
( |
poly |
ph, |
|
|
const ring |
r, |
|
|
number & |
c |
|
) |
| |
Definition at line 2897 of file p_polys.cc.
2909 #if CLEARENUMERATORS
2962 #if CLEARENUMERATORS
◆ p_Compare()
◆ p_ComparePolys()
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
Definition at line 4478 of file p_polys.cc.
4502 while ((p1 !=
NULL) )
◆ p_Content()
void p_Content |
( |
poly |
ph, |
|
|
const ring |
r |
|
) |
| |
Definition at line 2267 of file p_polys.cc.
2272 if (ph==
NULL)
return;
2278 if (
cf->cfSubringGcd==
ndGcd)
return;
2283 goto content_finish;
2295 goto content_finish;
◆ p_ContentForGB()
void p_ContentForGB |
( |
poly |
ph, |
|
|
const ring |
r |
|
) |
| |
Definition at line 2312 of file p_polys.cc.
2323 #if CLEARENUMERATORS
2376 #if CLEARENUMERATORS
2441 h =
n_Init(1, r->cf->extRing->cf);
◆ p_ContentRat()
void p_ContentRat |
( |
poly & |
ph, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1716 of file p_polys.cc.
1727 poly *C = (poly *)
omAlloc0((len+1)*
sizeof(poly));
1728 poly *LM = (poly *)
omAlloc0((len+1)*
sizeof(poly));
1729 int *
D = (
int *)
omAlloc0((len+1)*
sizeof(int));
1730 int *L = (
int *)
omAlloc0((len+1)*
sizeof(int));
1736 int HasConstantCoef = 0;
1737 int is = r->real_var_start - 1;
1749 HasConstantCoef = 1;
1759 int mindeglen = len;
1771 if (
D[
i] == mintdeg)
1773 if (L[
i] < mindeglen)
1780 d =
p_Copy(C[pmindeglen], r);
◆ p_CopyPowerProduct()
poly p_CopyPowerProduct |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
like p_Head, but with coefficient 1
Definition at line 4884 of file p_polys.cc.
4891 memcpy(np->exp,
p->exp, r->ExpL_Size*
sizeof(
long));
◆ p_Deg()
long p_Deg |
( |
poly |
a, |
|
|
const ring |
r |
|
) |
| |
◆ p_DegW()
long p_DegW |
( |
poly |
p, |
|
|
const short * |
w, |
|
|
const ring |
R |
|
) |
| |
◆ p_DeleteComp()
void p_DeleteComp |
( |
poly * |
p, |
|
|
int |
k, |
|
|
const ring |
r |
|
) |
| |
◆ p_Diff()
poly p_Diff |
( |
poly |
a, |
|
|
int |
k, |
|
|
const ring |
r |
|
) |
| |
◆ p_DiffOp()
poly p_DiffOp |
( |
poly |
a, |
|
|
poly |
b, |
|
|
BOOLEAN |
multiply, |
|
|
const ring |
r |
|
) |
| |
◆ p_DiffOpM()
static poly p_DiffOpM |
( |
poly |
a, |
|
|
poly |
b, |
|
|
BOOLEAN |
multiply, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Div_mm()
poly p_Div_mm |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r |
|
) |
| |
divide polynomial by monomial
Definition at line 1517 of file p_polys.cc.
◆ p_Div_nn()
poly p_Div_nn |
( |
poly |
p, |
|
|
const number |
n, |
|
|
const ring |
r |
|
) |
| |
◆ p_DivideM()
poly p_DivideM |
( |
poly |
a, |
|
|
poly |
b, |
|
|
const ring |
r |
|
) |
| |
◆ p_DivisibleByRingCase()
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), i.e., LT(f)*c*m = LT(g), for some coefficient c and some monomial m; does not take components into account
Definition at line 1614 of file p_polys.cc.
1620 for(
int i = (
int)
rVar(r);
i>0;
i--)
◆ p_EqualPolys() [1/2]
◆ p_EqualPolys() [2/2]
same as the usual p_EqualPolys for polys belonging to equal rings
Definition at line 4452 of file p_polys.cc.
4459 assume( r1->cf == r2->cf );
4461 while ((p1 !=
NULL) && (p2 !=
NULL))
◆ p_ExpVectorEqual()
Definition at line 4428 of file p_polys.cc.
4439 int i = r1->ExpL_Size;
4441 assume( r1->ExpL_Size == r2->ExpL_Size );
4443 unsigned long *ep = p1->exp;
4444 unsigned long *eq = p2->exp;
4449 if (ep[
i] != eq[
i])
return FALSE;
◆ p_Farey()
poly p_Farey |
( |
poly |
p, |
|
|
number |
N, |
|
|
const ring |
r |
|
) |
| |
◆ p_GcdMon()
poly p_GcdMon |
( |
poly |
f, |
|
|
poly |
g, |
|
|
const ring |
r |
|
) |
| |
polynomial gcd for f=mon
Definition at line 4846 of file p_polys.cc.
4853 int *mf=(
int*)
omAlloc((r->N+1)*
sizeof(int));
4855 int *mh=(
int*)
omAlloc((r->N+1)*
sizeof(int));
4869 for(
unsigned j=r->N;
j!=0;
j--)
4871 if (mh[
j]<mf[
j]) mf[
j]=mh[
j];
4872 if (mf[
j]>0) const_mon=
FALSE;
4874 if (one_coeff && const_mon)
break;
◆ p_GetCoeffRat()
poly p_GetCoeffRat |
( |
poly |
p, |
|
|
int |
ishift, |
|
|
ring |
r |
|
) |
| |
◆ p_GetMaxExpL()
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
Definition at line 1163 of file p_polys.cc.
1167 unsigned long l_p, divmask = r->divmask;
1172 l_p =
p->exp[r->VarL_Offset[0]];
1174 (((l_max & divmask) ^ (l_p & divmask)) != ((l_max-l_p) & divmask)))
1176 for (
i=1;
i<r->VarL_Size;
i++)
1178 l_p =
p->exp[r->VarL_Offset[
i]];
1181 (((l_max & divmask) ^ (l_p & divmask)) != ((l_max-l_p) & divmask)))
◆ p_GetMaxExpL2() [1/2]
static unsigned long p_GetMaxExpL2 |
( |
unsigned long |
l1, |
|
|
unsigned long |
l2, |
|
|
const ring |
r |
|
) |
| |
|
inlinestatic |
◆ p_GetMaxExpL2() [2/2]
static unsigned long p_GetMaxExpL2 |
( |
unsigned long |
l1, |
|
|
unsigned long |
l2, |
|
|
const ring |
r, |
|
|
unsigned long |
number_of_exp |
|
) |
| |
|
inlinestatic |
Definition at line 1095 of file p_polys.cc.
1100 const unsigned long bitmask = r->bitmask;
1101 unsigned long ml1 = l1 & bitmask;
1102 unsigned long ml2 = l2 & bitmask;
1103 unsigned long max = (ml1 > ml2 ? ml1 : ml2);
1104 unsigned long j = number_of_exp - 1;
1108 unsigned long mask = bitmask << r->BitsPerExp;
1113 max |= ((ml1 > ml2 ? ml1 : ml2) & mask);
1116 mask = mask << r->BitsPerExp;
◆ p_GetMaxExpP()
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, next == NULL, ord is not set
Definition at line 1126 of file p_polys.cc.
1136 unsigned long l_p, l_max;
1137 unsigned long divmask = r->divmask;
1141 offset = r->VarL_Offset[0];
1146 (((l_max & divmask) ^ (l_p & divmask)) != ((l_max-l_p) & divmask)))
1149 for (
i=1;
i<r->VarL_Size;
i++)
1156 (((l_max & divmask) ^ (l_p & divmask)) != ((l_max-l_p) & divmask)))
◆ p_GetSetmProc()
Definition at line 549 of file p_polys.cc.
557 if (r->typ[0].ord_typ ==
ro_dp &&
558 r->typ[0].data.dp.start == 1 &&
559 r->typ[0].data.dp.end == r->N &&
560 r->typ[0].data.dp.place == r->pOrdIndex)
562 if (r->typ[0].ord_typ ==
ro_wp &&
563 r->typ[0].data.wp.start == 1 &&
564 r->typ[0].data.wp.end == r->N &&
565 r->typ[0].data.wp.place == r->pOrdIndex &&
566 r->typ[0].data.wp.weights == r->firstwv)
◆ p_GetShortExpVector() [1/2]
unsigned long p_GetShortExpVector |
( |
const poly |
p, |
|
|
const poly |
pp, |
|
|
const ring |
r |
|
) |
| |
p_GetShortExpVector of p * pp
Definition at line 4734 of file p_polys.cc.
4744 unsigned long ev = 0;
4748 unsigned long i = 0L;
4759 for (;
j<=r->N;
j++)
◆ p_GetShortExpVector() [2/2]
unsigned long p_GetShortExpVector |
( |
const poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 4682 of file p_polys.cc.
4690 unsigned long ev = 0;
4704 for (;
j<=r->N;
j++)
◆ p_GetVariables()
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)
Definition at line 1254 of file p_polys.cc.
1264 for(
i=r->N;
i>0;
i--)
◆ p_HasNotCF()
◆ p_HasNotCFRing()
◆ p_Homogen()
poly p_Homogen |
( |
poly |
p, |
|
|
int |
varnum, |
|
|
const ring |
r |
|
) |
| |
Definition at line 3214 of file p_polys.cc.
3215 : deg(var(varnum))==1
3217 poly
p_Homogen (poly
p,
int varnum,
const ring r)
3231 if ((varnum < 1) || (varnum >
rVar(r)))
◆ p_InitContent()
number p_InitContent |
( |
poly |
ph, |
|
|
const ring |
r |
|
) |
| |
Definition at line 2578 of file p_polys.cc.
2605 d=
nlAdd(n1,t,r->cf);
2607 d=
nlSub(n1,t,r->cf);
2616 d=
nlAdd(n2,t,r->cf);
2618 d=
nlSub(n2,t,r->cf);
2625 d=
nlGcd(n1,n2,r->cf);
2641 if (
s<s2)
return n_Copy(d,r->cf);
2642 else return n_Copy(d2,r->cf);
◆ p_Invers()
static poly p_Invers |
( |
int |
n, |
|
|
poly |
u, |
|
|
intvec * |
w, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ p_ISet()
poly p_ISet |
( |
long |
i, |
|
|
const ring |
r |
|
) |
| |
returns the poly representing the integer i
Definition at line 1284 of file p_polys.cc.
◆ p_IsHomogeneous()
◆ p_IsPurePower()
return i, if head depends only on var(i)
Definition at line 1213 of file p_polys.cc.
◆ p_IsUnivariate()
int p_IsUnivariate |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
return i, if poly depends only on var(i)
Definition at line 1234 of file p_polys.cc.
1247 if((
k!=-1)&&(
k!=
i))
return 0;
◆ p_Jet()
poly p_Jet |
( |
poly |
p, |
|
|
int |
m, |
|
|
const ring |
R |
|
) |
| |
◆ p_JetW()
poly p_JetW |
( |
poly |
p, |
|
|
int |
m, |
|
|
short * |
w, |
|
|
const ring |
R |
|
) |
| |
◆ p_Last()
poly p_Last |
( |
const poly |
p, |
|
|
int & |
l, |
|
|
const ring |
r |
|
) |
| |
◆ p_Lcm() [1/2]
◆ p_Lcm() [2/2]
◆ p_LcmRat()
Definition at line 1649 of file p_polys.cc.
1660 for (
int i = r->real_var_end;
i>=r->real_var_start;
i--)
◆ p_LmDeleteAndNextRat()
void p_LmDeleteAndNextRat |
( |
poly * |
p, |
|
|
int |
ishift, |
|
|
ring |
r |
|
) |
| |
◆ p_LowVar()
int p_LowVar |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
the minimal index of used variables - 1
Definition at line 4582 of file p_polys.cc.
4590 if (
p ==
NULL)
return -1;
4597 while ((
l < (
rVar(r))) && (lex == 0))
◆ p_MDivide()
poly p_MDivide |
( |
poly |
a, |
|
|
poly |
b, |
|
|
const ring |
r |
|
) |
| |
◆ p_MinDeg()
◆ p_mInit()
Definition at line 1429 of file p_polys.cc.
1438 if ((
s!=st)&&isdigit(st[0]))
◆ p_MonMult()
static void p_MonMult |
( |
poly |
p, |
|
|
poly |
q, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_MonMultC()
static poly p_MonMultC |
( |
poly |
p, |
|
|
poly |
q, |
|
|
const ring |
rr |
|
) |
| |
|
static |
◆ p_MonPower()
static poly p_MonPower |
( |
poly |
p, |
|
|
int |
exp, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Norm()
void p_Norm |
( |
poly |
p1, |
|
|
const ring |
r |
|
) |
| |
◆ p_Normalize()
void p_Normalize |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_NSet()
poly p_NSet |
( |
number |
n, |
|
|
const ring |
r |
|
) |
| |
returns the poly representing the number n, destroys n
Definition at line 1452 of file p_polys.cc.
◆ p_One()
poly p_One |
( |
const ring |
r | ) |
|
◆ p_OneComp()
return TRUE if all monoms have the same component
Definition at line 1195 of file p_polys.cc.
◆ p_PermPoly()
Definition at line 4033 of file p_polys.cc.
4043 const int OldpVariables =
rVar(oldRing);
4045 poly result_last =
NULL;
4051 poly tmp_mm=
p_One(dst);
4061 number n = nMap(
p_GetCoeff(
p, oldRing), oldRing->cf, dst->cf);
4090 int mapped_to_par = 0;
4091 for(
int i = 1;
i <= OldpVariables;
i++)
4121 n_Power(ee, e, &eee, dst->cf);
4122 ee =
n_Mult(c, eee, dst->cf);
4128 const int par = -perm[
i];
4132 const coeffs C = dst->cf;
4134 const ring
R = C->extRing;
4142 pcn = NUM((fraction)c);
4203 if (result_last==
NULL)
4209 pNext(result_last)=qq;
◆ p_PolyDiv()
assumes that p and divisor are univariate polynomials in r, mentioning the same variable; assumes divisor != NULL; p may be NULL; assumes a global monomial ordering in r; performs polynomial division of p by divisor:
- afterwards p contains the remainder of the division, i.e., p_before = result * divisor + p_afterwards;
- if needResult == TRUE, then the method computes and returns 'result', otherwise NULL is returned (This parametrization can be used when one is only interested in the remainder of the division. In this case, the method will be slightly faster.) leaves divisor unmodified
Definition at line 1842 of file p_polys.cc.
1852 int divisorLE =
p_GetExp(divisor, 1, r);
◆ p_Pow()
static poly p_Pow |
( |
poly |
p, |
|
|
int |
i, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Pow_charp()
static poly p_Pow_charp |
( |
poly |
p, |
|
|
int |
i, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Power()
poly p_Power |
( |
poly |
p, |
|
|
int |
i, |
|
|
const ring |
r |
|
) |
| |
Definition at line 2169 of file p_polys.cc.
2184 if ( (
i > 0) && ((
unsigned long )
i > (r->bitmask))
2185 #ifdef HAVE_SHIFTBBA
2190 Werror(
"exponent %d is too large, max. is %ld",
i,r->bitmask);
2234 int char_p=
rChar(r);
2235 if ((char_p>0) && (
i>char_p)
2241 while (rest>=char_p)
2256 if ((char_p==0) || (
i<=char_p))
◆ p_ProjectiveUnique()
void p_ProjectiveUnique |
( |
poly |
ph, |
|
|
const ring |
r |
|
) |
| |
Definition at line 3086 of file p_polys.cc.
3150 fraction
f = (fraction)
h;
3161 if (!
n_IsOne (n, C->extRing->cf))
3165 nMap=
n_SetMap (C->extRing->cf, C);
3166 number ninv= nMap (n,C->extRing->cf, C);
◆ p_Read()
Definition at line 1357 of file p_polys.cc.
1373 while (*
s!=
'\0')
s++;
1385 const char *s_save=
s;
1387 if (((
unsigned long)
i) > r->bitmask/2)
1418 for(
unsigned int k = iFirstAltVar;
k <= iLastAltVar;
k++)
◆ p_Series()
poly p_Series |
( |
int |
n, |
|
|
poly |
p, |
|
|
poly |
u, |
|
|
intvec * |
w, |
|
|
const ring |
R |
|
) |
| |
Definition at line 4400 of file p_polys.cc.
4412 p=
p_JetW(
p_Mult_q(
p,
p_Invers(n-
p_MinDeg(
p,
w,
R),u,
w,
R),
R),n,ww,
R);
◆ p_Setm_Dummy()
void p_Setm_Dummy |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_Setm_General()
void p_Setm_General |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
!!!????? where?????
Definition at line 151 of file p_polys.cc.
170 p->exp[o->
data.dp.place]=ord;
181 int *
w=o->
data.wp.weights;
183 for(
int i=a;
i<=e;
i++) ord+=((
unsigned long)
p_GetExp(
p,
i,r))*((
unsigned long)
w[
i-a]);
187 for(
int i=a;
i<=e;
i++)
197 p->exp[o->
data.wp.place]=ord;
203 const short a=o->
data.am.start;
204 const short e=o->
data.am.end;
205 const int *
w=o->
data.am.weights;
207 for(
short i=a;
i<=e;
i++,
w++)
212 for(
short i=a;
i<=e;
i++)
224 const short len_gen= o->
data.am.len_gen;
226 if ((c > 0) && (c <= len_gen))
233 p->exp[o->
data.am.place] = ord;
240 a=o->
data.wp64.start;
244 for(
int i=a;
i<=e;
i++)
251 if(ei!=0 && ai/ei!=wi)
255 Print(
"ai %lld, wi %lld\n",ai,wi);
257 Print(
"ai %ld, wi %ld\n",ai,wi);
265 Print(
"ai %lld, ord %lld\n",ai,ord);
267 Print(
"ai %ld, ord %ld\n",ai,ord);
272 long a_0=(long)(ord&mask);
273 long a_1=(long)(ord >>31 );
279 p->exp[o->
data.wp64.place]=a_1;
280 p->exp[o->
data.wp64.place+1]=a_0;
293 int pl=o->
data.cp.place;
302 o->
data.syzcomp.Components);
304 o->
data.syzcomp.ShiftedComponents);
305 if (ShiftedComponents !=
NULL)
308 assume(c == 0 || Components[c] != 0);
309 sc = ShiftedComponents[Components[c]];
310 assume(c == 0 || sc != 0);
312 p->exp[o->
data.syzcomp.place]=sc;
318 const short place = o->
data.syz.place;
319 const int limit = o->
data.syz.limit;
321 if (c > (
unsigned long)limit)
322 p->exp[place] = o->
data.syz.curr_index;
325 assume( (1 <= c) && (c <= (
unsigned long)limit) );
326 p->exp[place]= o->
data.syz.syz_index[c];
342 Print(
"p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);
p_wrp(
p, r);
351 const int*
const pVarOffset = o->
data.isTemp.pVarOffset;
356 for(
int i = 1;
i <= r->N;
i++ )
358 const int vo = pVarOffset[
i];
368 for(
int i = 1;
i <= r->N;
i++ )
370 const int vo = pVarOffset[
i];
390 Print(
"p_Setm_General: ro_is ord: pos: %d, p: ", pos);
p_wrp(
p, r);
399 const ideal F = o->
data.is.F;
400 const int limit = o->
data.is.limit;
402 const int start = o->
data.is.start;
404 if( F !=
NULL && c > limit )
408 Print(
"p_Setm_General: ro_is : in rSetm: pos: %d, c: %d > limit: %d\n", c, pos, limit);
409 PrintS(
"preComputed Values: ");
428 const poly
pp = F->m[c];
437 Print(
"Respective F[c - %d: %d] pp: ", limit, c);
442 const int end = o->
data.is.end;
450 Print(
"p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start,
p->exp[start]);
456 for(
int i = start;
i <= end;
i++)
457 p->exp[
i] +=
pp->exp[
i];
460 if (r->NegWeightL_Offset !=
NULL)
462 for (
int i=r->NegWeightL_Size-1;
i>=0;
i--)
464 const int _i = r->NegWeightL_Offset[
i];
465 if( start <= _i && _i <= end )
472 const int*
const pVarOffset = o->
data.is.pVarOffset;
476 for(
int i = 1;
i <= r->N;
i++ )
478 const int vo = pVarOffset[
i];
492 const int*
const pVarOffset = o->
data.is.pVarOffset;
497 const int vo = pVarOffset[0];
503 Print(
"ELSE p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo,
p->exp[vo]);
516 if (pos == r->OrdSize)
return;
◆ p_Setm_Syz()
void p_Setm_Syz |
( |
poly |
p, |
|
|
ring |
r, |
|
|
int * |
Components, |
|
|
long * |
ShiftedComponents |
|
) |
| |
◆ p_Setm_TotalDegree()
void p_Setm_TotalDegree |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_Setm_WFirstTotalDegree()
void p_Setm_WFirstTotalDegree |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ p_SetModDeg()
void p_SetModDeg |
( |
intvec * |
w, |
|
|
ring |
r |
|
) |
| |
◆ p_Shift()
void p_Shift |
( |
poly * |
p, |
|
|
int |
i, |
|
|
const ring |
r |
|
) |
| |
shifts components of the vector p by i
Definition at line 4608 of file p_polys.cc.
4614 poly qp1 = *
p,qp2 = *
p;
4639 qp2->next = qp1->next;
◆ p_SimpleContent()
void p_SimpleContent |
( |
poly |
ph, |
|
|
int |
smax, |
|
|
const ring |
r |
|
) |
| |
Definition at line 2521 of file p_polys.cc.
2527 if (ph==
NULL)
return;
2538 if (
n_Size(d,r->cf)<=smax)
2546 if (smax==1) smax=2;
◆ p_Size()
int p_Size |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 3197 of file p_polys.cc.
3203 if (r->cf->has_simple_Alloc)
◆ p_Split()
void p_Split |
( |
poly |
p, |
|
|
poly * |
h |
|
) |
| |
◆ p_SplitAndReversePoly()
static void p_SplitAndReversePoly |
( |
poly |
p, |
|
|
int |
n, |
|
|
poly * |
non_zero, |
|
|
poly * |
zero, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Sub()
poly p_Sub |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1962 of file p_polys.cc.
1963 : the procedure is only used in the interpreter
1965 poly
p_Sub(poly p1, poly p2,
const ring r)
◆ p_Subst()
poly p_Subst |
( |
poly |
p, |
|
|
int |
n, |
|
|
poly |
e, |
|
|
const ring |
r |
|
) |
| |
◆ p_Subst0()
static poly p_Subst0 |
( |
poly |
p, |
|
|
int |
n, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Subst1()
static poly p_Subst1 |
( |
poly |
p, |
|
|
int |
n, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ p_Subst2()
static poly p_Subst2 |
( |
poly |
p, |
|
|
int |
n, |
|
|
number |
e, |
|
|
const ring |
r |
|
) |
| |
|
static |
Definition at line 3805 of file p_polys.cc.
3813 poly zero, non_zero;
3818 while (non_zero !=
NULL)
◆ p_TakeOutComp() [1/2]
poly p_TakeOutComp |
( |
poly * |
p, |
|
|
int |
k, |
|
|
const ring |
r |
|
) |
| |
◆ p_TakeOutComp() [2/2]
void p_TakeOutComp |
( |
poly * |
r_p, |
|
|
long |
comp, |
|
|
poly * |
r_q, |
|
|
int * |
lq, |
|
|
const ring |
r |
|
) |
| |
◆ p_TakeOutComp1()
poly p_TakeOutComp1 |
( |
poly * |
p, |
|
|
int |
k, |
|
|
const ring |
r |
|
) |
| |
◆ p_TwoMonPower()
static poly p_TwoMonPower |
( |
poly |
p, |
|
|
int |
exp, |
|
|
const ring |
r |
|
) |
| |
|
static |
Definition at line 2078 of file p_polys.cc.
2086 poly tail,
b,
res,
h;
2099 al = (
exp + 1) *
sizeof(poly);
2102 for (e=1; e<
exp; e++)
2108 for (e=
exp-1; e>eh; e--)
2117 for (e=eh; e!=0; e--)
◆ p_Var()
int p_Var |
( |
poly |
m, |
|
|
const ring |
r |
|
) |
| |
◆ p_Vec2Array()
void p_Vec2Array |
( |
poly |
v, |
|
|
poly * |
p, |
|
|
int |
len, |
|
|
const ring |
r |
|
) |
| |
vector to already allocated array (len>=p_MaxComp(v,r))
julia: vector to already allocated array (len=p_MaxComp(v,r))
Definition at line 3549 of file p_polys.cc.
3562 if (
k>len) {
Werror(
"wrong rank:%d, should be %d",len,
k); }
3571 for(
int i=len-1;
i>=0;
i--)
◆ p_Vec2Poly()
poly p_Vec2Poly |
( |
poly |
v, |
|
|
int |
k, |
|
|
const ring |
r |
|
) |
| |
◆ p_Vec2Polys()
void p_Vec2Polys |
( |
poly |
v, |
|
|
poly ** |
p, |
|
|
int * |
len, |
|
|
const ring |
r |
|
) |
| |
◆ p_VectorHasUnit()
void p_VectorHasUnit |
( |
poly |
p, |
|
|
int * |
k, |
|
|
int * |
len, |
|
|
const ring |
r |
|
) |
| |
Definition at line 3308 of file p_polys.cc.
3332 if ((*len == 0) || (
j<*len))
◆ p_VectorHasUnitB()
◆ p_WDegree()
long p_WDegree |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 703 of file p_polys.cc.
711 for(
i=1;
i<=r->firstBlockEnds;
i++)
◆ p_Weight()
int p_Weight |
( |
int |
i, |
|
|
const ring |
r |
|
) |
| |
Definition at line 694 of file p_polys.cc.
697 if ((r->firstwv==
NULL) || (
i>r->firstBlockEnds))
701 return r->firstwv[
i-1];
◆ p_WFirstTotalDegree()
long p_WFirstTotalDegree |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 585 of file p_polys.cc.
591 for (
i=1;
i<= r->firstBlockEnds;
i++)
◆ p_WTotaldegree()
long p_WTotaldegree |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
Definition at line 602 of file p_polys.cc.
610 for (
i=0;r->order[
i]!=0;
i++)
617 for (
k=b0 ;
k<=b1 ;
k++)
626 for (
k=b0 ;
k<=b1 ;
k++)
635 for (
k=b0 ;
k<=b1 ;
k++)
648 for (
k=b0 ;
k<=b1 ;
k++)
656 for (
k=0;
k<=(b1 - b0 );
k++)
◆ pEnlargeSet()
void pEnlargeSet |
( |
poly ** |
p, |
|
|
int |
l, |
|
|
int |
increment |
|
) |
| |
Definition at line 3653 of file p_polys.cc.
3662 if (increment==0)
return;
3663 h=(poly*)
omAlloc0(increment*
sizeof(poly));
3670 memset(&(
h[
l]),0,increment*
sizeof(poly));
◆ pLDeg0()
long pLDeg0 |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg0c()
long pLDeg0c |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1()
long pLDeg1 |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1_Deg()
long pLDeg1_Deg |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1_Totaldegree()
long pLDeg1_Totaldegree |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1_WFirstTotalDegree()
long pLDeg1_WFirstTotalDegree |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1c()
long pLDeg1c |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1c_Deg()
long pLDeg1c_Deg |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1c_Totaldegree()
long pLDeg1c_Totaldegree |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDeg1c_WFirstTotalDegree()
long pLDeg1c_WFirstTotalDegree |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
◆ pLDegb()
long pLDegb |
( |
poly |
p, |
|
|
int * |
l, |
|
|
const ring |
r |
|
) |
| |
Definition at line 800 of file p_polys.cc.
805 long o = r->pFDeg(
p, r);
◆ pModDeg()
static long pModDeg |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
|
static |
Definition at line 3621 of file p_polys.cc.
3628 if ((c>0) && ((r->pModW)->range(c-1))) d+= (*(r->pModW))[c-1];
◆ pnBin()
static number* pnBin |
( |
int |
exp, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ pnFreeBin()
static void pnFreeBin |
( |
number * |
bin, |
|
|
int |
exp, |
|
|
const coeffs |
r |
|
) |
| |
|
static |
◆ pp_Jet()
poly pp_Jet |
( |
poly |
p, |
|
|
int |
m, |
|
|
const ring |
R |
|
) |
| |
◆ pp_JetW()
poly pp_JetW |
( |
poly |
p, |
|
|
int |
m, |
|
|
short * |
w, |
|
|
const ring |
R |
|
) |
| |
◆ pRestoreDegProcs()
◆ pSetDegProcs()
Definition at line 3594 of file p_polys.cc.
3600 r->pFDeg = new_FDeg;
3602 if (new_lDeg ==
NULL)
3603 new_lDeg = r->pLDegOrig;
◆ _components
◆ _componentsExternal
◆ _componentsShifted
◆ pOldFDeg
◆ pOldLDeg
◆ pOldLexOrder
◆ pSetm_error
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static poly p_Pow_charp(poly p, int i, const ring r)
static int si_min(const int a, const int b)
poly singclap_gcd(poly f, poly g, const ring r)
polynomial gcd via singclap_gcd_r resp. idSyzygies destroys f and g
int dReportError(const char *fmt,...)
static unsigned long p_SubComp(poly p, unsigned long v, ring r)
static poly p_LmFreeAndNext(poly p, ring)
int exponent(const CanonicalForm &f, int q)
int exponent ( const CanonicalForm & f, int q )
static BOOLEAN p_LmIsConstantComp(const poly p, 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 BOOLEAN rIsLPRing(const ring r)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
static poly p_MonPower(poly p, int exp, const ring r)
void p_Normalize(poly p, const ring r)
static poly p_Invers(int n, poly u, intvec *w, const 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 ...
BOOLEAN rOrd_SetCompRequiresSetm(const ring r)
return TRUE if p_SetComp requires p_Setm
const CanonicalForm int const CFList const Variable & y
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
void sBucket_Add_m(sBucket_pt bucket, poly p)
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)
#define p_SetRingOfLm(p, r)
long(* pFDegProc)(poly p, ring r)
static poly p_Head(poly p, const ring r)
copy the i(leading) term of p
static poly p_Mult_mm(poly p, poly m, const ring r)
static poly p_Neg(poly p, const ring r)
static poly p_LmInit(poly p, const ring r)
static number * pnBin(int exp, const ring r)
static poly p_TwoMonPower(poly p, int exp, const ring r)
poly p_Homogen(poly p, int varnum, const ring r)
short * iv2array(intvec *iv, const ring R)
poly singclap_pdivide(poly f, poly g, const ring r)
long totaldegreeWecart_IV(poly p, ring r, const short *w)
#define TEST_OPT_CONTENTSB
#define __p_GetComp(p, r)
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
number p_InitContent(poly ph, const ring r)
void p_wrp(poly p, ring lmRing, ring tailRing)
STATIC_VAR pFDegProc pOldFDeg
static unsigned long p_GetMaxExpL2(unsigned long l1, unsigned long l2, const ring r, unsigned long number_of_exp)
static const FORCE_INLINE char * n_Read(const char *s, number *a, const coeffs r)
!!! Recommendation: This method is too cryptic to be part of the user- !!! interface....
const CanonicalForm CFMap CFMap & N
static BOOLEAN rField_is_Zp_a(const ring r)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
poly p_mInit(const char *st, BOOLEAN &ok, const ring r)
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 BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
#define POLY_NEGWEIGHT_OFFSET
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 BOOLEAN rField_has_Units(const ring r)
#define __p_Mult_nn(p, n, r)
void p_Lcm(const poly a, const poly b, poly m, const ring r)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
LINLINE number nlSub(number la, number li, const coeffs r)
static void p_ExpVectorSub(poly p1, poly p2, const ring r)
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,...
#define p_LmEqual(p1, p2, r)
void p_Setm_Dummy(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 @Note: VarOffset encodes the position in p->exp
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static int rGetCurrSyzLimit(const ring r)
STATIC_VAR int _componentsExternal
static unsigned pLength(poly a)
poly n_PermNumber(const number z, const int *par_perm, const int, const ring src, const ring dst)
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
int r_IsRingVar(const char *n, char **names, int N)
static void p_SetExpV(poly p, int *ev, const ring r)
void p_LmDeleteAndNextRat(poly *p, int ishift, ring r)
for(int i=0;i<=n;i++) degsf[i]
long p_WFirstTotalDegree(poly p, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
poly p_Power(poly p, int i, const ring r)
STATIC_VAR BOOLEAN pOldLexOrder
static short rVar(const ring r)
#define rVar(r) (r->N)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static long p_GetOrder(poly p, ring r)
#define TEST_OPT_INTSTRATEGY
poly p_Sub(poly p1, poly p2, const ring r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static BOOLEAN rField_is_Q_a(const ring r)
static poly p_SortAdd(poly p, const ring r, BOOLEAN revert=FALSE)
void PrintS(const char *s)
#define omFreeSize(addr, size)
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
static int p_Cmp(poly p1, poly p2, ring r)
static int p_Comp_k_n(poly a, poly b, int k, ring r)
static short scaFirstAltVar(ring r)
static poly p_MonMultC(poly p, poly q, const ring rr)
static BOOLEAN rField_is_Ring(const ring r)
poly p_Div_nn(poly p, const number n, const ring r)
static poly p_Subst2(poly p, int n, number e, const ring r)
sBucket_pt sBucketCreate(const ring r)
void p_ContentRat(poly &ph, const ring r)
poly p_JetW(poly p, int m, short *w, const ring R)
static BOOLEAN rIsRatGRing(const ring r)
static FORCE_INLINE BOOLEAN nCoeff_is_Q_a(const coeffs r)
static int max(int a, int b)
number ndGcd(number, number, const coeffs r)
static void p_LmDelete(poly p, const ring r)
STATIC_VAR long * _componentsShifted
number nlGcd(number a, number b, const coeffs r)
void nlNormalize(number &x, const coeffs r)
void p_Write(poly p, ring lmRing, ring tailRing)
poly p_Cleardenom(poly p, const ring r)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
#define omTypeAllocBin(type, addr, bin)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
const char * p_Read(const char *st, poly &rc, const ring r)
static void p_GetExpV(poly p, int *ev, const ring r)
static poly p_Init(const ring r, omBin bin)
static int p_LmCmp(poly p, poly q, const ring r)
int p_MinDeg(poly p, intvec *w, const ring R)
void p_Setm_WFirstTotalDegree(poly p, const ring r)
static void pnFreeBin(number *bin, int exp, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
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)
BOOLEAN nlGreaterZero(number za, const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
static poly p_Subst1(poly p, int n, const ring r)
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
static long p_MultExp(poly p, int v, long ee, ring r)
void p_Setm_General(poly p, const ring r)
static FORCE_INLINE number n_Farey(number a, number b, const coeffs r)
gmp_float exp(const gmp_float &a)
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
#define p_LmCheckPolyRing2(p, r)
static void p_LmFree(poly p, ring)
void p_ContentForGB(poly ph, const ring r)
number ntInit(long i, const coeffs cf)
static BOOLEAN rIsNCRing(const ring r)
long p_Deg(poly a, const ring r)
void nlInpGcd(number &a, number b, const coeffs r)
static void p_Delete(poly *p, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static BOOLEAN rField_is_GF(const 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 number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
static int si_max(const int a, const int b)
static unsigned long p_AddComp(poly p, unsigned long v, ring r)
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...
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
LINLINE number nlAdd(number la, number li, const coeffs r)
BOOLEAN p_CheckPolyRing(poly p, ring r)
#define rRing_has_Comp(r)
Induced (Schreyer) ordering.
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
void Werror(const char *fmt,...)
static short scaLastAltVar(ring r)
static number p_SetCoeff(poly p, number n, ring r)
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 number n_Copy(number n, const coeffs r)
return a copy of 'n'
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,...
void WerrorS(const char *s)
static poly p_Pow(poly p, int i, const ring r)
static BOOLEAN rField_has_simple_inverse(const ring r)
static poly p_DiffOpM(poly a, poly b, BOOLEAN multiply, const ring r)
static long p_AddExp(poly p, int v, long ee, ring r)
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 number n_ChineseRemainderSym(number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r)
const char * eati(const char *s, int *i)
#define p_LmCheckPolyRing1(p, r)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
poly p_GetCoeffRat(poly p, int ishift, ring r)
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static void p_Setm(poly p, const ring r)
static unsigned long GetBitFields(const long e, const unsigned int s, const unsigned int n)
static poly p_GetExp_k_n(poly p, int l, int k, const ring r)
static void p_SplitAndReversePoly(poly p, int n, poly *non_zero, poly *zero, const ring r)
const Variable & v
< [in] a sqrfree bivariate poly
static long p_IncrExp(poly p, int v, ring r)
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 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 long p_Totaldegree(poly p, const ring r)
static BOOLEAN p_ExpVectorEqual(poly p1, poly p2, const ring r1, const ring r2)
static BOOLEAN p_IsConstant(const poly p, const ring r)
static void p_MonMult(poly p, poly q, const ring r)
for idElimination, like a, except pFDeg, pWeigths ignore it
const CanonicalForm int s
int status int void size_t count
static BOOLEAN rIsSyzIndexRing(const ring 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 nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
void p_Setm_TotalDegree(poly p, const ring r)
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
static poly p_Mult_q(poly p, poly q, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
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 bool rIsSCA(const ring r)
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
LINLINE void nlDelete(number *a, const coeffs r)
static BOOLEAN rField_is_Zp(const ring r)
static poly p_Subst0(poly p, int n, const ring r)
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
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_VAR pLDegProc pOldLDeg
static poly pReverse(poly p)
static long p_DecrExp(poly p, int v, 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
static long pModDeg(poly p, ring r)
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
static BOOLEAN rField_is_Q(const ring r)
#define omReallocSize(addr, o_size, size)
int p_Weight(int i, const ring r)
STATIC_VAR int * _components