1#define PLURAL_INTERNAL_DECLARATIONS
25 if(
h.IsNull())
return;
31 int pos=
posInS(strat, strat->
sl,
h.p,
h.ecart);
63 if(
h.IsNull())
return;
84 if (strat->
sl!=-1) pos =
posInS(strat, strat->
sl,
h.p,
h.ecart);
85 strat->
enterS(&
h, pos, strat, -1);
147 PrintS(
"ideal tempF: \n");
149 PrintS(
"ideal tempQ: \n");
176 for(; strat->
Ll >= 0;
202 strat->
P = strat->
L[strat->
Ll];
208 if(strat->
P.IsNull())
continue;
218 if(strat->
P.IsNull())
continue;
228 message((strat->
honey ? strat->
P.ecart : 0) + strat->
P.pFDeg(), &olddeg,&reduc,strat, red_result);
231 strat->
red(&strat->
P,strat);
233 if(strat->
P.IsNull())
continue;
237 const poly save = strat->
P.p;
247 const poly p_next =
pNext(save);
250 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
261 if( tt ==
NULL)
continue;
298 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
344 ideal I = strat->
Shdl;
358 return (strat->
Shdl);
375 PrintS(
"\n\n<sca_bba>\n\n");
462 withT = ! strat->
homog;
484 for (
int iNewElement = strat->
newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
486 const poly pSave = tempF->m[iNewElement];
492 const poly p_next =
pNext(pSave);
495 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
522 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
531 while (strat->
Ll >= 0)
551 while ((strat->
Ll >= 0)
563 if (strat->
Ll<0)
break;
568 strat->
P = strat->
L[strat->
Ll];
574 if(strat->
P.IsNull())
continue;
586 if(strat->
P.IsNull())
continue;
588 if (strat->
P.p1 ==
NULL)
600 &olddeg,&reduc,strat, red_result);
603 red_result = strat->
red(&strat->
P,strat);
613 strat->
P.GetP(strat->
lmBin);
615 int pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
620 strat->
P.pCleardenom();
623 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
624 strat->
P.pCleardenom();
631 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
671 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
680 const poly pSave = strat->
P.p;
681 const poly p_next =
pNext(pSave);
685 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
716 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
730 red_result = strat->
red(&
h,strat);
733 if (red_result != 1)
continue;
736 int pos =
posInS(strat,strat->
sl,
h.p,
h.ecart);
767 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
828 ideal I = strat->
Shdl;
836 PrintS(
"\n\n</sca_bba>\n\n");
841 return (strat->
Shdl);
848#ifdef MORA_USE_BUCKETS
854#ifdef MORA_USE_BUCKETS
944 for (
int iNewElement = strat->
newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
947 const poly pSave = tempF->m[iNewElement];
953 const poly p_next =
pNext(pSave);
956 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
983 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
992 while (strat->
Ll >= 0)
999 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg))
1004 while ((strat->
Ll >= 0)
1005 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
1006 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg)
1015 if (strat->
Ll<0)
break;
1018 strat->
P = strat->
L[strat->
Ll];
1025 if(strat->
P.IsNull())
continue;
1037 if (strat->
P.p1 ==
NULL)
1044 if (!strat->
P.IsNull())
1048 message(strat->
P.ecart+strat->
P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
1050 red_result = strat->
red(&strat->
P,strat);
1053 if (! strat->
P.IsNull())
1062 strat->
P.p =
redtail(&(strat->
P),strat->
sl,strat);
1070 strat->
P.pCleardenom();
1078 posInS(strat,strat->
sl,strat->
P.p, strat->
P.ecart),
1087 const poly pSave = strat->
P.p;
1088 const poly p_next =
pNext(pSave);
1091 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
1117 if (strat->
Ll != -1)
1118 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
1129 if (strat->kHEdgeFound)
1180 return (strat->
Shdl);
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
void(* enterS)(LObject *h, int pos, kStrategy strat, int atR)
void(* initEcart)(TObject *L)
int(* posInT)(const TSet T, const int tl, LObject &h)
int(* red)(LObject *L, kStrategy strat)
static std::vector< std::vector< int > > p_new(ideal Xo, ideal Sigma)
long scMult0Int(ideal S, ideal Q)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
static BOOLEAN kMoraUseBucket(kStrategy)
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
ideal k_sca_bba(const ideal F, const ideal Q, const intvec *, const bigintmat *, kStrategy strat, const ring _currRing)
Modified modern Sinuglar Buchberger's algorithm.
void addLObject(LObject &h, kStrategy &strat)
ideal k_sca_gr_bba(const ideal F, const ideal Q, const intvec *, const bigintmat *, kStrategy strat, const ring _currRing)
Modified Plural's Buchberger's algorithmus.
ideal k_sca_mora(const ideal F, const ideal Q, const intvec *, const bigintmat *, kStrategy strat, const ring _currRing)
Modified modern Sinuglar Mora's algorithm.
void initMora(ideal F, kStrategy strat)
int redFirst(LObject *h, kStrategy strat)
int redEcart(LObject *h, kStrategy strat)
void initBba(kStrategy strat)
ideal kInterRedOld(ideal F, const ideal Q)
poly redtail(LObject *L, int end_pos, kStrategy strat)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void message(int i, int *olddeg, int *reduc, kStrategy strat, int red_result)
BOOLEAN kTest(kStrategy strat)
BOOLEAN kTest_TS(kStrategy strat)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
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 enterT(LObject *p, kStrategy strat, int atT)
int posInT110(const TSet set, const int length, LObject &p)
void updateResult(ideal r, ideal Q, kStrategy strat)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
void completeReduce(kStrategy strat, BOOLEAN withT)
void messageSets(kStrategy strat)
void messageStat(int hilbcount, kStrategy strat)
void cancelunit(LObject *L, BOOLEAN inNF)
static void kDeleteLcm(LObject *P)
static bool rIsSCA(const ring r)
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
static matrix mu(matrix A, const ring R)
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
#define TEST_OPT_MULTBOUND
#define TEST_OPT_NOT_BUCKETS
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
poly p_Cleardenom(poly p, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
void p_wrp(poly p, ring lmRing, ring tailRing)
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).
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
void PrintS(const char *s)
void rWrite(ring r, BOOLEAN details)
void rDebugPrint(const ring r)
static short rVar(const ring r)
define rVar(r) (r->N)
#define rField_is_Ring(R)
ideal SCAQuotient(const ring r)
static short scaLastAltVar(ring r)
static short scaFirstAltVar(ring r)
static bool id_IsSCAHomogeneous(const ideal id, const intvec *wCx, const intvec *wCy, const ring r)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix