60 int length=(int)I->ncols;
61 for(
int j=length-1;
j>=0;
j--)
86 assume( (0<n) && (n<=(
v->rows())) );
91 for (
int i=c-1;
i>=0;
i--)
93 int temp=
abs((*
v)[
i+cc ]);
118 for (n=pertdeg; n>1; n--)
126 if( sum64!=0 && (((inveps64-1)/sum64)!=
getMaxTdeg(
G)) )
147 if (inveps64>=temp64)
176 for (
int i=0;
i<c;
i++)
178 (*res)[
i]=(*v)[
i+cc ];
192 for (
int i=0;
i<c;
i++)
221 for (n=2; n<=pertdeg; n++)
229 if((*temp64)[
i]!=0 && (((*taun64)[
i])/((*temp64)[
i]))!=inveps64)
239 if( ( ((*temp64)[
i]) > 0 ) && ( ((*add64)[
i]) > 0 ) )
241 if( ((*taun64)[
i]) < ((*temp64)[
i]) )
244 if( ( ((*temp64)[
i]) < 0 ) && ( ((*add64)[
i]) < 0 ) )
246 if( ((*taun64)[
i]) > ((*temp64)[
i]) )
271 assume(
a->length() ==
b->length());
272 int i, n =
a->length();
275 for(
i=n-1;
i>=0;
i--)
277 temp1=(*a)[
i] * (*b)[
i];
305 ideal I=
idInit(length,
G->rank);
307 int64 leadingweight,templeadingweight;
310 for (
j=1;
j<=length;
j++)
321 if(templeadingweight==leadingweight)
325 if(templeadingweight>leadingweight)
329 leadingweight=templeadingweight;
358 for(
int i=length;
i>0;
i--)
386 for(
int i=length;
i>0;
i--)
420 if((temp=
pLength(
p))>0) {sum += (temp-1);}
490 int64 temp1,temp2,temp3,temp4;
495 temp1=((
int64)((*listw)[
j-1]));
496 temp2=((*currw64)[
j-1]);
498 zaehler64=temp3-temp4;
503 if( ( temp3<0 && temp4>0 ) || ( temp3>0 && temp4<0 ) )
510 temp1=((*targw64)[
j-1])-((*currw64)[
j-1]);
513 temp2=((
int64)((*listw)[
j-1]));
516 nenner64=temp3+temp4;
521 if( (temp3>0 && temp4>0) ||
522 (temp3<0 && temp4<0) )
525 if( (abs_t3+
abs64(temp4))<abs_t3 )
538 if ( (zaehler64<=0) && (nenner64<0) )
540 zaehler64=-zaehler64;
570 for(
int j=1;
j<=
s;
j++)
573 int64 temptvec0, temptvec1;
574 gett64(tt,currw64,targw64,temptvec0, temptvec1);
580 (temptvec0>0) && (temptvec1>0)
583 if( ( (temptvec0) <= (temptvec1) )
585 ( ( (temptvec0) * (tvec1) ) <
586 ( (temptvec1) * (tvec0) ) )
621 if( (nexttvec0) !=0 &&
622 (((*a)[
i])/(nexttvec0))!=((*tempv)[
i]) )
634 if( (nexttvec1) !=0 &&
635 (((*b)[
i])/(nexttvec1))!=((*tempv)[
i]) )
646 if( (((*
a)[
i])>=0 && ((*
b)[
i])>=0) ||
647 (((*a)[
i])<0 && ((*
b)[
i])<0) )
663 for (
int i=1;
i<
s;
i++)
665 temp=(*nextweight)[
i];
670 if (
g!=1) *nextweight /=
g;
691 if(0<n && n<=((
int)I->ncols))
752 int *e=(
int*)
omAlloc((
N+1)*
sizeof(int));
755 for(
int i=
N;
i>0;
i--) { (*iv)[
i-1]=e[
i];}
775 int *e=(
int*)
omAlloc((
N+1)*
sizeof(int));
816 assume(
a->length() ==
b->length());
817 int i, n =
a->length();
819 for(
i=n-1;
i>=0;
i--)
841 int r, p0 =
a, p1 =
b;
876 while(p1 != ((
int64)0) )
923 l->m[0].data=(
void *)iv64;
924 l->m[1].data=(
void *)i64;
1030 while(
r->order[
i]!=0 && pos2<n)
1032 pos2=pos2+
r->block1[
i] -
r->block0[
i];
1036 for(
int j=pos1;
j<=pos2;
j++)
1041 for(
int j=pos1;
j<=pos2;
j++)
1043 for(
int j=1;
j<=(pos2-pos1);
j++)
1048 for(
int j=pos1;
j<=pos2;
j++)
1050 for(
int j=1;
j<=(pos2-pos1);
j++)
1055 int* weights=
r->wvhdl[
i];
1056 for(
int j=pos1;
j<=pos2;
j++)
1058 for(
int j=1;
j<=(pos2-pos1);
j++)
1063 int* weights=
r->wvhdl[
i];
1064 for(
int j=pos1;
j<=pos2;
j++)
1066 for(
int j=1;
j<=(pos2-pos1);
j++)
1072 int* weights=
r->wvhdl[0];
1073 for(
int j=pos1;
j<((pos2+1)*(pos2+1));
j++)
1112 length=
r->block1[0] -
r->block0[0];
1113 for (
int j=0;
j<=length;
j++)
1119 int* weights=
r->wvhdl[0];
1120 length=
r->block1[0] -
r->block0[0];
1121 for (
int j=0;
j<=length;
j++)
1127 length=
r->block1[0] -
r->block0[0];
1128 for (
int j=0;
j<=length;
j++)
1129 (*
res)[
j]=weights[
j];
1154 for (
int i=0;
i<(
s-1);
i++)
1156 for (
int j=0;
j<((
s-1)-
i);
j++)
1186 int r=source->
rows();
1187 int c=source->
cols();
1189 for(
int i=0;
i<
r;
i++){
1190 for(
int j=0;
j<c;
j++){
1191 (*res)[
i*c+
j]=(int)(*source)[
i*c+
j];
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
void nextt64(ideal G, int64vec *currw64, int64vec *targw64, int64 &tvec0, int64 &tvec1)
int64vec * rGetGlobalOrderWeightVec(ring r)
void rCopyAndChangeA(int64vec *w)
const CanonicalForm int s
static long scalarProduct(intvec *a, intvec *b)
#define idDelete(H)
delete an ideal
Compatiblity layer for legacy polynomial operations (over currRing)
int64vec * iv64Copy(int64vec *o)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
int64vec * iv64Add(int64vec *a, int64vec *b)
static short rVar(const ring r)
#define rVar(r) (r->N)
int64vec * nextw64(int64vec *currw, int64vec *targw, int64 nexttvec0, int64 nexttvec1)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
intvec * ivSub(intvec *a, intvec *b)
int64vec * getNthRow64(intvec *v, int n)
int64vec * leadExp64(poly p)
Rational abs(const Rational &a)
int invEpsOk64(ideal I, intvec *targm, int pertdeg, int64 inveps64)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
const CanonicalForm CFMap CFMap & N
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...
for(int i=0;i< R->ExpL_Size;i++) Print("%09lx "
static long pTotaldegree(poly p)
ideal init64(ideal G, int64vec *currw64)
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
int64vec * iv64Sub(int64vec *a, int64vec *b)
ideal idInterRed(ideal G)
void getTaun64(ideal G, intvec *targm, int pertdeg, int64vec **v64, int64 &i64)
ideal kInterRedOld(ideal F, ideal Q)
int iv64Size(int64vec *v)
matrix matIdLift(ideal Gomega, ideal M)
static unsigned pLength(poly a)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
int64 gcd64(int64 a, int64 b)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
void rChangeCurrRing(ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void rSetWeightVec(ring r, int64 *wv)
intvec * getNthRow(intvec *v, int n)
BOOLEAN noPolysWithMoreThanTwoTerms(ideal Gw)
const Variable & v
< [in] a sqrfree bivariate poly
int getMaxPosOfNthRow(intvec *v, int n)
matrix id_Module2formatedMatrix(ideal mod, int rows, int cols, const ring R)
BOOLEAN currwOnBorder64(ideal G, int64vec *currw64)
#define pGetExpV(p, e)
Gets a copy of (resp. set) the exponent vector, where e is assumed to point to (r->N +1)*sizeof(long)...
int64vec * rGetGlobalOrderMatrix(ring r)
void gett64(intvec *listw, int64vec *currw64, int64vec *targw64, int64 &tvec0, int64 &tvec1)
intvec * int64VecToIntVec(int64vec *source)
static int64 scalarProduct64(int64vec *a, int64vec *b)
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit, GbVariant alg)
poly getNthPolyOfId(ideal I, int n)
#define IMATELEM(M, I, J)
int64 getInvEps64(ideal G, intvec *targm, int pertdeg)