32 for (
j=0;
j<=o->
tl;
j++)
69 for (
j=0;
j<=o->
Ll;
j++)
107 l[
j].i_r1=n->
T[
i].i_r;
129 l[
j].i_r2=n->
T[
i].i_r;
135 l[
j].ecart=o->
L[
j].ecart;
137 l[
j].length=o->
L[
j].length;
139 l[
j].pLength=o->
L[
j].pLength;
141 l[
j].sev=o->
L[
j].sev;
142 l[
j].i_r = o->
L[
j].i_r;
175 s->sevT=(
unsigned long *)
omAlloc(o->
tmax*
sizeof(
unsigned long));
176 memcpy(
s->sevT,o->
sevT,o->
tmax*
sizeof(
unsigned long));
242 fac_copy=
idInit(fac_elems,1);
248 Print(
"%d factors:\n",fac_elems);
251 while(ii>0) { ii--;
pWrite(fac->m[ii]); }
258 while(ii>0) {
PrintS(
"F"); ii--; }
285 for (si=strat->
sl; si>0; si--)
299 for(
i=strat->
tl;
i>=0;
i--)
335 if (n->
sl==-1) pos=0;
368 ideal r=
idAdd(n->
D,fac_copy);
374 Print(
"new s(%d)->D:\n",n->
nr);
380 fac_copy->m[
i]=
pCopy(fac->m[
i]);
396 Print(
"empty set s(%d) because D[%d]:",n->
nr,
j);
406 if (n->
S[
i]==n->
T[n->
tl].p)
434 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
441 Print(
"empty set because:L[%p]\n",(
void *)Lj);
450 if (n->
S[
i]==n->
T[n->
tl].p)
475 if ((strat->
Ll>=0) && (strat->
sl>=0))
break;
486 if ((strat->
Ll==-1) && (strat->
sl>=0))
491 while (strat->
Ll >= 0)
509 strat->
P = strat->
L[strat->
Ll];
532 red_result = strat->
red(&strat->
P,strat);
533 if (strat->
P.p !=
NULL)
559 fac->m[0]=strat->
P.p;
594 if (n->
sl==-1) pos=0;
632 for(ii=0; ii<=n->
tl; ii++)
634 if (n->
R[ii]->p==n->
L[
i].p1) { n->
L[
i].i_r1=ii;
break; }
637 for(ii=0; ii<=n->
tl; ii++)
639 if (n->
R[ii]->p==n->
L[
i].p2) { n->
L[
i].i_r2=ii;
break; }
655 ideal r=
idAdd(n->
D,fac_copy);
667 fac_copy->m[
i]=
pCopy(fac->m[
i]);
683 Print(
"empty set s(%d) because: D[%d]:", n->
nr,
j);
695 if (n->
S[
i]==n->
T[n->
tl].p)
723 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
731 Print(
"empty set s(%d) because:L[%d]\n",n->
nr,Lj->nr);
733 Print(
"empty set s(%d) because:\n",n->
nr);
743 if (n->
S[
i]==n->
T[n->
tl].p)
772 if ((strat->
Ll==-1) && (strat->
sl>=0))
795 return (strat->
Shdl);
850 PrintS(
"====================================\n");
873 ideal_list LL=(ideal_list)
omAlloc(
sizeof(*LL));
886 ideal_list Lj=L->
next;
887 ideal_list Lj_prev=L;
899 Print(
"empty set L[%p] because:L[%p]\n",(
void*)Lj,(
void*)Li);
907 if (Lj==L) Lj_prev=
NULL;
911 while(Lj_prev->next!=Lj) Lj_prev=Lj_prev->next;
922 if (Lj!=
NULL) Lj=Lj->next;
936 orgstrat=strat->
next;
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
void(* chainCrit)(poly p, int ecart, kStrategy strat)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
void(* initEcart)(TObject *L)
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
int(* posInT)(const TSet T, const int tl, LObject &h)
int(* red)(LObject *L, kStrategy strat)
const CanonicalForm int s
#define idDelete(H)
delete an ideal
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
ideal idAdd(ideal h1, ideal h2)
h1 + h2
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
long kModDeg(poly p, ring r)
void initBba(kStrategy strat)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
static void copyL(kStrategy o, kStrategy n)
static void completeReduceFac(kStrategy strat, ideal_list FL)
kStrategy kStratCopy(kStrategy o)
ideal_list kStdfac(ideal F, ideal Q, tHomog h, intvec **w, ideal D)
static void copyT(kStrategy o, kStrategy n)
BOOLEAN k_factorize(poly p, ideal &rfac, ideal &fac_copy)
ideal bbafac(ideal, ideal Q, intvec *, kStrategy strat, ideal_list FL)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void enterT(LObject &p, kStrategy strat, int atT)
BOOLEAN kTest_TS(kStrategy strat)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void initBuchMoraPos(kStrategy strat)
void exitBuchMora(kStrategy strat)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
void updateResult(ideal r, ideal Q, kStrategy strat)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
void messageSets(kStrategy strat)
void deleteInS(int i, kStrategy strat)
void messageStat(int hilbcount, kStrategy strat)
static LSet initL(int nr=setmaxL)
static void kDeleteLcm(LObject *P)
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define omFreeSize(addr, size)
#define TEST_OPT_INTSTRATEGY
#define TEST_OPT_DEGBOUND
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
poly p_Cleardenom(poly p, const ring r)
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
static int pLength(poly a)
static poly p_LmInit(poly p, const 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)
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
#define pInit()
allocates a new monomial and initializes everything to 0
#define pCopy(p)
return a copy of the poly
void PrintS(const char *s)
static BOOLEAN rField_has_simple_inverse(const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
EXTERN_VAR short * ecartWeights