83 assume( (0<n) && (n<=(
v->rows())) );
88 for (
int i=c-1;
i>=0;
i--)
90 int temp=
abs((*
v)[
i+cc ]);
115 for (n=pertdeg; n>1; n--)
123 if( sum64!=0 && (((inveps64-1)/sum64)!=
getMaxTdeg(
G)) )
144 if (inveps64>=temp64)
173 for (
int i=0;
i<c;
i++)
175 (*res)[
i]=(*v)[
i+cc ];
189 for (
int i=0;
i<c;
i++)
218 for (n=2; n<=pertdeg; n++)
226 if((*temp64)[
i]!=0 && (((*taun64)[
i])/((*temp64)[
i]))!=inveps64)
236 if( ( ((*temp64)[
i]) > 0 ) && ( ((*add64)[
i]) > 0 ) )
238 if( ((*taun64)[
i]) < ((*temp64)[
i]) )
241 if( ( ((*temp64)[
i]) < 0 ) && ( ((*add64)[
i]) < 0 ) )
243 if( ((*taun64)[
i]) > ((*temp64)[
i]) )
272 for(
i=n-1;
i>=0;
i--)
274 temp1=(*a)[
i] * (*b)[
i];
304 int64 leadingweight,templeadingweight;
318 if(templeadingweight==leadingweight)
322 if(templeadingweight>leadingweight)
326 leadingweight=templeadingweight;
417 if((temp=
pLength(
p))>0) {sum += (temp-1);}
487 int64 temp1,temp2,temp3,temp4;
492 temp1=((
int64)((*listw)[
j-1]));
493 temp2=((*currw64)[
j-1]);
495 zaehler64=temp3-temp4;
500 if( ( temp3<0 && temp4>0 ) || ( temp3>0 && temp4<0 ) )
507 temp1=((*targw64)[
j-1])-((*currw64)[
j-1]);
510 temp2=((
int64)((*listw)[
j-1]));
513 nenner64=temp3+temp4;
518 if( (temp3>0 && temp4>0) ||
519 (temp3<0 && temp4<0) )
522 if( (abs_t3+
abs64(temp4))<abs_t3 )
535 if ( (zaehler64<=0) && (nenner64<0) )
537 zaehler64=-zaehler64;
567 for(
int j=1;
j<=
s;
j++)
570 int64 temptvec0, temptvec1;
571 gett64(tt,currw64,targw64,temptvec0, temptvec1);
577 (temptvec0>0) && (temptvec1>0)
580 if( ( (temptvec0) <= (temptvec1) )
582 ( ( (temptvec0) * (tvec1) ) <
583 ( (temptvec1) * (tvec0) ) )
618 if( (nexttvec0) !=0 &&
619 (((*a)[
i])/(nexttvec0))!=((*tempv)[
i]) )
631 if( (nexttvec1) !=0 &&
632 (((*b)[
i])/(nexttvec1))!=((*tempv)[
i]) )
643 if( (((*a)[
i])>=0 && ((*
b)[
i])>=0) ||
644 (((*a)[
i])<0 && ((*
b)[
i])<0) )
660 for (
int i=1;
i<
s;
i++)
662 temp=(*nextweight)[
i];
667 if (
g!=1) *nextweight /=
g;
688 if(0<n && n<=((
int)I->ncols))
749 int *e=(
int*)
omAlloc((
N+1)*
sizeof(int));
752 for(
int i=
N;
i>0;
i--) { (*iv)[
i-1]=e[
i];}
772 int *e=(
int*)
omAlloc((
N+1)*
sizeof(int));
816 for(
i=n-1;
i>=0;
i--)
838 int r, p0 = a, p1 =
b;
873 while(p1 != ((
int64)0) )
920 l->m[0].data=(
void *)iv64;
921 l->m[1].data=(
void *)i64;
1027 while(r->order[
i]!=0 && pos2<n)
1029 pos2=pos2+r->block1[
i] - r->block0[
i];
1033 for(
int j=pos1;
j<=pos2;
j++)
1038 for(
int j=pos1;
j<=pos2;
j++)
1040 for(
int j=1;
j<=(pos2-pos1);
j++)
1045 for(
int j=pos1;
j<=pos2;
j++)
1047 for(
int j=1;
j<=(pos2-pos1);
j++)
1052 int* weights=r->wvhdl[
i];
1053 for(
int j=pos1;
j<=pos2;
j++)
1055 for(
int j=1;
j<=(pos2-pos1);
j++)
1060 int* weights=r->wvhdl[
i];
1061 for(
int j=pos1;
j<=pos2;
j++)
1063 for(
int j=1;
j<=(pos2-pos1);
j++)
1069 int* weights=r->wvhdl[0];
1070 for(
int j=pos1;
j<((pos2+1)*(pos2+1));
j++)
1109 length=r->block1[0] - r->block0[0];
1116 int* weights=r->wvhdl[0];
1117 length=r->block1[0] - r->block0[0];
1124 length=r->block1[0] - r->block0[0];
1126 (*
res)[
j]=weights[
j];
1151 for (
int i=0;
i<(
s-1);
i++)
1153 for (
int j=0;
j<((
s-1)-
i);
j++)
1183 int r=source->
rows();
1184 int c=source->
cols();
1186 for(
int i=0;
i<r;
i++){
1187 for(
int j=0;
j<c;
j++){
1188 (*res)[
i*c+
j]=(int)(*source)[
i*c+
j];
Rational abs(const Rational &a)
const CanonicalForm CFMap CFMap & N
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
for(j=0;j< factors.length();j++)
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit, GbVariant alg)
represents the generators of submod in terms of the generators of mod (Matrix(SM)*U-Matrix(rest)) = M...
#define idDelete(H)
delete an ideal
int64vec * iv64Add(int64vec *a, int64vec *b)
int64vec * iv64Sub(int64vec *a, int64vec *b)
int64vec * iv64Copy(int64vec *o)
static BOOLEAN length(leftv result, leftv arg)
intvec * ivSub(intvec *a, intvec *b)
#define IMATELEM(M, I, J)
ideal kInterRedOld(ideal F, ideal Q)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
static int pLength(poly a)
static void p_GetExpV(poly p, int *ev, const ring r)
void rChangeCurrRing(ring 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)
static long pTotaldegree(poly p)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
void rSetWeightVec(ring r, int64 *wv)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
@ ringorder_a64
for int64 weights
static short rVar(const ring r)
#define rVar(r) (r->N)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
matrix id_Module2formatedMatrix(ideal mod, int rows, int cols, const ring R)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
int64vec * rGetGlobalOrderMatrix(ring r)
void nextt64(ideal G, int64vec *currw64, int64vec *targw64, int64 &tvec0, int64 &tvec1)
poly getNthPolyOfId(ideal I, int n)
matrix matIdLift(ideal Gomega, ideal M)
int invEpsOk64(ideal I, intvec *targm, int pertdeg, int64 inveps64)
EXTERN_VAR BOOLEAN overflow_error
void getTaun64(ideal G, intvec *targm, int pertdeg, int64vec **v64, int64 &i64)
int getMaxPosOfNthRow(intvec *v, int n)
intvec * getNthRow(intvec *v, int n)
BOOLEAN currwOnBorder64(ideal G, int64vec *currw64)
int64vec * nextw64(int64vec *currw, int64vec *targw, int64 nexttvec0, int64 nexttvec1)
static long scalarProduct(intvec *a, intvec *b)
BOOLEAN noPolysWithMoreThanTwoTerms(ideal Gw)
void rCopyAndChangeA(int64vec *w)
intvec * int64VecToIntVec(int64vec *source)
int64 gcd64(int64 a, int64 b)
ideal init64(ideal G, int64vec *currw64)
void gett64(intvec *listw, int64vec *currw64, int64vec *targw64, int64 &tvec0, int64 &tvec1)
int64vec * getNthRow64(intvec *v, int n)
int64vec * leadExp64(poly p)
ideal idInterRed(ideal G)
static int64 scalarProduct64(int64vec *a, int64vec *b)
int64 getInvEps64(ideal G, intvec *targm, int pertdeg)
int64vec * rGetGlobalOrderWeightVec(ring r)
int iv64Size(int64vec *v)