4 #include <gfanlib/gfanlib.h> 8 long wDeg(
const poly p,
const ring
r,
const gfan::ZVector &
w)
11 for (
unsigned i=0;
i<
w.size();
i++)
13 if (!
w[
i].fitsInInt())
15 WerrorS(
"wDeg: overflow in weight vector");
23 gfan::ZVector
WDeg(
const poly p,
const ring
r,
const gfan::ZVector &
w,
const gfan::ZMatrix &W)
25 gfan::ZVector d = gfan::ZVector(W.getHeight()+1);
27 for (
int i=0;
i<W.getHeight();
i++)
40 for (
poly currentTerm =
p->next; currentTerm;
pIter(currentTerm))
42 long e =
wDeg(currentTerm,
r,
w);
60 ideal
initial(
const ideal I,
const ring
r,
const gfan::ZVector &
w)
63 for (
int i=0;
i<
k;
i++)
75 gfan::ZVector d =
WDeg(
p,
r,
w,W);
76 for (
poly currentTerm =
p->next; currentTerm;
pIter(currentTerm))
78 gfan::ZVector e =
WDeg(currentTerm,
r,
w,W);
96 ideal
initial(
const ideal I,
const ring
r,
const gfan::ZVector &
w,
const gfan::ZMatrix &W)
99 for (
int i=0;
i<
k;
i++)
143 void initial(ideal* IStar,
const ring
r,
const gfan::ZVector &
w)
147 for (
int i=0;
i<
k;
i++)
152 void initial(
poly* pStar,
const ring
r,
const gfan::ZVector &
w,
const gfan::ZMatrix &W)
158 gfan::ZVector d =
WDeg(
p,
r,
w,W);
166 gfan::ZVector e =
WDeg(
p,
r,
w,W);
191 void initial(ideal* IStar,
const ring
r,
const gfan::ZVector &
w,
const gfan::ZMatrix &W)
195 for (
int i=0;
i<
k;
i++)
static poly p_LmDeleteAndNext(poly p, const ring r)
void WerrorS(const char *s)
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
static poly p_Head(poly p, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
static void p_Delete(poly *p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
long wDeg(const poly p, const ring r, const gfan::ZVector &w)
various functions to compute the initial form of polynomials and ideals
gfan::ZVector WDeg(const poly p, const ring r, const gfan::ZVector &w, const gfan::ZMatrix &W)
Returns the weighted multidegree of the leading term of p with respect to (w,W).