1 #define PLURAL_INTERNAL_DECLARATIONS 28 if(h.IsNull())
return;
34 int pos=
posInS(strat, strat->
sl, h.p, h.ecart);
68 if(h.IsNull())
return;
89 if (strat->
sl!=-1) pos =
posInS(strat, strat->
sl, h.p, h.ecart);
90 strat->
enterS(h, pos, strat, -1);
152 PrintS(
"ideal tempF: \n");
154 PrintS(
"ideal tempQ: \n");
181 for(; strat->
Ll >= 0;
207 strat->
P = strat->
L[strat->
Ll];
213 if(strat->
P.IsNull())
continue;
223 if(strat->
P.IsNull())
continue;
233 message((strat->
honey ? strat->
P.ecart : 0) + strat->
P.pFDeg(), &olddeg,&reduc,
strat, red_result);
236 strat->red(&strat->P,strat);
238 if(strat->P.IsNull())
continue;
242 const poly save = strat->P.p;
255 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
266 if( tt ==
NULL)
continue;
280 strat->initEcart(&h);
304 pos = strat->posInL(strat->L,strat->Ll,&h,strat);
307 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
350 ideal I = strat->
Shdl;
364 return (strat->
Shdl);
381 PrintS(
"\n\n<sca_bba>\n\n");
468 withT = ! strat->
homog;
473 #undef HAVE_TAIL_RING 475 #ifdef HAVE_TAIL_RING 497 for (
int iNewElement = strat->
newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
499 const poly pSave = tempF->m[iNewElement];
508 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
519 if( p_new ==
NULL)
continue;
535 pos = strat->
posInL(strat->
L,strat->
Ll,&h,strat);
544 while (strat->
Ll >= 0)
564 while ((strat->
Ll >= 0)
576 if (strat->
Ll<0)
break;
581 strat->
P = strat->
L[strat->
Ll];
587 if(strat->
P.IsNull())
continue;
599 if(strat->
P.IsNull())
continue;
601 if (strat->
P.p1 ==
NULL)
613 &olddeg,&reduc,
strat, red_result);
616 red_result = strat->red(&strat->P,strat);
626 strat->P.GetP(strat->lmBin);
628 int pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
633 strat->P.pCleardenom();
636 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
637 strat->P.pCleardenom();
644 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
681 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
684 strat->enterS(strat->P, pos, strat, strat->tl);
693 const poly pSave = strat->P.p;
698 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
708 if( p_new ==
NULL)
continue;
724 strat->initEcart(&h);
730 pos = strat->posInL(strat->L,strat->Ll,&h,strat);
732 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
739 strat->initEcart(&h);
741 h.PrepareRed(strat->use_buckets);
744 red_result = strat->red(&h,strat);
747 if (red_result != 1)
continue;
750 int pos =
posInS(strat,strat->sl,h.p,h.ecart);
776 strat->initEcart(&h);
781 pos = strat->posInL(strat->L,strat->Ll,&h,strat);
783 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
842 ideal I = strat->
Shdl;
850 PrintS(
"\n\n</sca_bba>\n\n");
855 return (strat->
Shdl);
862 #ifdef MORA_USE_BUCKETS 868 #ifdef MORA_USE_BUCKETS 973 #undef HAVE_TAIL_RING 975 #ifdef HAVE_TAIL_RING 987 for (
int iNewElement = strat->
newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
990 const poly pSave = tempF->m[iNewElement];
999 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
1011 if( p_new ==
NULL)
continue;
1025 if (strat->
Ll != -1)
1026 pos = strat->
posInL(strat->
L,strat->
Ll,&h,strat);
1035 while (strat->
Ll >= 0)
1042 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg))
1047 while ((strat->
Ll >= 0)
1048 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
1049 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg)
1058 if (strat->
Ll<0)
break;
1061 strat->
P = strat->
L[strat->
Ll];
1068 if(strat->
P.IsNull())
continue;
1080 if (strat->
P.p1 ==
NULL)
1087 if (!strat->
P.IsNull())
1091 message(strat->
P.ecart+strat->
P.GetpFDeg(),&olddeg,&reduc,
strat, red_result);
1093 red_result = strat->red(&strat->P,strat);
1096 if (! strat->
P.IsNull())
1105 strat->
P.p =
redtail(&(strat->
P),strat->
sl,strat);
1113 strat->
P.pCleardenom();
1121 posInS(strat,strat->
sl,strat->
P.p, strat->
P.ecart),
1131 const poly pSave = strat->
P.p;
1135 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
1147 if( p_new ==
NULL)
continue;
1161 if (strat->
Ll != -1)
1162 pos = strat->
posInL(strat->
L,strat->
Ll,&h,strat);
1169 memset(&strat->
P,0,
sizeof(strat->
P));
1225 return (strat->
Shdl);
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
ideal SCAQuotient(const ring r)
poly redtail(LObject *L, int pos, kStrategy strat)
void mu(int **points, int sizePoints)
int redEcart(LObject *h, kStrategy strat)
#define TEST_OPT_DEGBOUND
void initBuchMoraPos(kStrategy strat)
ideal k_sca_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Modified modern Sinuglar Buchberger's algorithm.
ideal k_sca_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Modified Plural's Buchberger's algorithmus.
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void initMora(ideal F, kStrategy strat)
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
void messageStat(int hilbcount, kStrategy strat)
ideal k_sca_mora(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
Modified modern Sinuglar Mora's algorithm.
Compatiblity layer for legacy polynomial operations (over currRing)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
int redFirst(LObject *h, kStrategy strat)
void addLObject(LObject &h, kStrategy &strat)
#define omFreeSize(addr, size)
static bool id_IsSCAHomogeneous(const ideal id, const intvec *wCx, const intvec *wCy, const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
#define TEST_OPT_MULTBOUND
void cancelunit(LObject *L, BOOLEAN inNF)
void initBba(kStrategy strat)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
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)
void updateL(kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
#define TEST_OPT_NOT_BUCKETS
void enterT(LObject &p, kStrategy strat, int atT)
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 ...
static int sca_mora_count
#define TEST_OPT_INTSTRATEGY
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
int scMult0Int(ideal S, ideal Q, const ring tailRing)
void updateLHC(kStrategy strat)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl.cc )
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
void initBuchMoraCrit(kStrategy strat)
void reorderL(kStrategy strat)
void rDebugPrint(const ring r)
ideal kInterRedOld(ideal F, ideal Q)
void PrintS(const char *s)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
void rWrite(ring r, BOOLEAN details)
void p_Content(poly ph, const ring r)
static short scaFirstAltVar(ring r)
void rChangeCurrRing(ring r)
static BOOLEAN rField_is_Ring(const ring r)
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
void firstUpdate(kStrategy strat)
int posInT110(const TSet set, const int length, LObject &p)
void pNorm(poly p, const ring R=currRing)
static BOOLEAN kMoraUseBucket(kStrategy)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
static short scaLastAltVar(ring r)
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
static bool rIsSCA(const ring r)
void completeReduce(kStrategy strat, BOOLEAN withT)
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 ...
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
void p_wrp(poly p, ring lmRing, ring tailRing)
int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
poly p_Cleardenom(poly p, const ring r)
void exitBuchMora(kStrategy strat)
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
void kDebugPrint(kStrategy strat)