41 for (j=0; j<=o->
tl; j++)
78 for (j=0; j<=o->
Ll; j++)
90 if (o->
L[j].lcm!=
NULL)
115 l[
j].i_r1=n->
T[
i].i_r;
137 l[
j].i_r2=n->
T[
i].i_r;
143 l[
j].ecart=o->
L[
j].ecart;
145 l[
j].length=o->
L[
j].length;
147 l[
j].pLength=o->
L[
j].pLength;
149 l[
j].sev=o->
L[
j].sev;
150 l[
j].i_r = o->
L[
j].i_r;
255 fac_copy=
idInit(fac_elems,1);
261 Print(
"-> %d factors\n",fac_elems);
266 while(ii>0) { ii--;
pWrite(fac->m[ii]); }
274 while(ii>0) {
PrintS(
"F"); ii--; }
281 Print(
"-> %d factors\n",fac_elems);
285 while(ii>0) { ii--;
pWrite(fac->m[ii]); }
313 for (si=strat->
sl; si>0; si--)
327 for(i=strat->
tl;i>=0;i--)
363 if (n->
sl==-1) pos=0;
412 Print(
"---------------------------------------------------------------\ns(%d), set S\n",n->
nr);
413 for(ii=0;ii<n->
sl;ii++)
425 fac_copy->m[
i]=
pCopy(fac->m[i]);
434 if (n->
D->m[j]!=
NULL)
442 Print(
"empty set s(%d) because: D[%d] -> 0\n",
449 PrintS(
"empty set because:");
460 if (n->
S[i]==n->
T[n->
tl].p)
488 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
494 Print(
"empty set s(%d) because:L[%d]\n",n->
nr,Lj->nr);
503 Print(
"empty set because:L[%p]\n",(
void *)Lj);
511 if (n->
S[i]==n->
T[n->
tl].p)
536 if ((strat->
Ll>=0) && (strat->
sl>=0))
break;
547 if ((strat->
Ll==-1) && (strat->
sl>=0))
552 while (strat->
Ll >= 0)
570 strat->
P = strat->
L[strat->
Ll];
593 red_result = strat->
red(&strat->
P,strat);
594 if (strat->
P.p !=
NULL)
620 fac->m[0]=strat->
P.p;
655 if (n->
sl==-1) pos=0;
693 for(ii=0; ii<=n->
tl; ii++)
695 if (n->
R[ii]->p==n->
L[i].p1) { n->
L[
i].i_r1=ii;
break; }
698 for(ii=0; ii<=n->
tl; ii++)
700 if (n->
R[ii]->p==n->
L[i].p2) { n->
L[
i].i_r2=ii;
break; }
731 Print(
"-------------------------------------------------------------\ns(%d), set S\n",n->
nr);
732 for(ii=0;ii<n->
sl;ii++)
744 fac_copy->m[
i]=
pCopy(fac->m[i]);
753 if (n->
D->m[j]!=
NULL)
761 Print(
"empty set s(%d) because: D[%d] -> 0\n",
768 PrintS(
"empty set because:");
781 if (n->
S[i]==n->
T[n->
tl].p)
809 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
817 Print(
"empty set s(%d) because:L[%d]\n",n->
nr,Lj->nr);
824 Print(
"empty set because:L[%p]\n",(
void*)Lj);
832 if (n->
S[i]==n->
T[n->
tl].p)
861 if ((strat->
Ll==-1) && (strat->
sl>=0))
882 return (strat->
Shdl);
937 PrintS(
"====================================\n");
960 ideal_list LL=(ideal_list)
omAlloc(
sizeof(*LL));
973 ideal_list Lj=L->
next;
974 ideal_list Lj_prev=L;
986 Print(
"empty set L(%d) because:L(%d)\n",Lj->nr,Li->nr);
991 Print(
"empty set L[%p] because:L[%p]\n",(
void*)Lj,(
void*)Li);
998 if (Lj==L) Lj_prev=
NULL;
1002 while(Lj_prev->next!=Lj) Lj_prev=Lj_prev->next;
1013 if (Lj!=
NULL) Lj=Lj->next;
1027 orgstrat=strat->
next;
1031 if ((delete_w)&&(w!=
NULL)&&(*w!=
NULL))
delete *w;
BOOLEAN idHomIdeal(ideal id, ideal Q=NULL, const ring R=currRing)
const const intvec const intvec const ring _currRing const const intvec const intvec const ring _currRing int
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
const CanonicalForm int s
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
#define TEST_OPT_DEGBOUND
void initBuchMoraPos(kStrategy strat)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
ideal_list kStdfac(ideal F, ideal Q, tHomog h, intvec **w, ideal D)
void messageStat(int hilbcount, kStrategy strat)
Compatiblity layer for legacy polynomial operations (over currRing)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void enterT(LObject p, kStrategy strat, int atT)
#define omFreeSize(addr, size)
const CanonicalForm CFMap CFMap int &both_non_zero int n
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
void deleteInS(int i, kStrategy strat)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
ideal idAdd(ideal h1, ideal h2, const ring R=currRing)
h1 + h2
BOOLEAN idHomModule(ideal m, ideal Q, intvec **w, const ring R=currRing)
int(* red)(LObject *L, kStrategy strat)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
int(* posInT)(const TSet T, const int tl, LObject &h)
static int pLength(poly a)
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
static BOOLEAN rField_has_simple_inverse(const ring r)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void(* initEcart)(TObject *L)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
#define TEST_OPT_INTSTRATEGY
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
kStrategy kStratCopy(kStrategy o)
void initBba(ideal, kStrategy strat)
static void copyL(kStrategy o, kStrategy n)
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
D(ideal gnc_gr_bba(const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)) D(ideal gnc_gr_mora(const ideal
Modified Plural's Buchberger's algorithmus.
void idDelete(ideal *h, ring r=currRing)
delete an ideal
void initBuchMoraCrit(kStrategy strat)
void PrintS(const char *s)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
void idSkipZeroes(ideal ide)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
ideal idInit(int idsize, int rank)
void(* chainCrit)(poly p, int ecart, kStrategy strat)
static void completeReduceFac(kStrategy strat, ideal_list FL)
void pNorm(poly p, const ring R=currRing)
#define pInit()
allocates a new monomial and initializes everything to 0
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
long kModDeg(poly p, ring r)
void updateResult(ideal r, ideal Q, kStrategy strat)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced ...
ideal idCopy(ideal A, const ring R=currRing)
BOOLEAN k_factorize(poly p, ideal &rfac, ideal &fac_copy)
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
static LSet initL(int nr=setmaxL)
ideal bbafac(ideal, ideal Q, intvec *, kStrategy strat, ideal_list FL)
void(* enterS)(LObject h, int pos, kStrategy strat, int atR)
poly p_Cleardenom(poly p, const ring r)
void exitBuchMora(kStrategy strat)
static void copyT(kStrategy o, kStrategy n)
#define pCopy(p)
return a copy of the poly