Modified modern Sinuglar Buchberger's algorithm.
382 PrintS(
"\n\n<sca_bba>\n\n");
469 withT = ! strat->
homog;
474 #undef HAVE_TAIL_RING
476 #ifdef HAVE_TAIL_RING
498 for (
int iNewElement = strat->
newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
500 const poly pSave = tempF->m[iNewElement];
509 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
520 if( p_new ==
NULL)
continue;
536 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
545 while (strat->
Ll >= 0)
566 while ((strat->
Ll >= 0)
578 if (strat->
Ll<0)
break;
583 strat->
P = strat->
L[strat->
Ll];
589 if(strat->
P.IsNull())
continue;
601 if(strat->
P.IsNull())
continue;
603 if (strat->
P.p1 ==
NULL)
615 &olddeg,&reduc,
strat, red_result);
618 red_result = strat->red(&strat->P,strat);
628 strat->P.GetP(strat->lmBin);
630 int pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
635 strat->P.pCleardenom();
638 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
639 strat->P.pCleardenom();
646 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
683 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
686 strat->enterS(strat->P, pos, strat, strat->tl);
695 const poly pSave = strat->P.p;
700 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
710 if( p_new ==
NULL)
continue;
726 strat->initEcart(&
h);
732 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
734 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
741 strat->initEcart(&
h);
743 h.PrepareRed(strat->use_buckets);
746 red_result = strat->red(&
h,strat);
749 if (red_result != 1)
continue;
752 int pos =
posInS(strat,strat->sl,
h.p,
h.ecart);
778 strat->initEcart(&
h);
783 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
785 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
844 ideal I = strat->Shdl;
852 PrintS(
"\n\n</sca_bba>\n\n");
857 return (strat->Shdl);
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
ideal SCAQuotient(const ring r)
#define TEST_OPT_DEGBOUND
void initBuchMoraPos(kStrategy strat)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void messageStat(int hilbcount, kStrategy strat)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void enterT(LObject p, kStrategy strat, int atT)
static bool id_IsSCAHomogeneous(const ideal id, const intvec *wCx, const intvec *wCy, const ring r)
void id_Delete(ideal *h, ring r)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
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 ...
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
int(* posInT)(const TSet T, const int tl, LObject &h)
void kStratInitChangeTailRing(kStrategy strat)
#define TEST_OPT_NOT_BUCKETS
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 ...
#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:
void initBba(ideal, kStrategy strat)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl.cc )
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
void initBuchMoraCrit(kStrategy strat)
ideal kInterRedOld(ideal F, ideal Q)
void PrintS(const char *s)
void rWrite(ring r, BOOLEAN details)
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)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
static short scaLastAltVar(ring r)
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)
void exitBuchMora(kStrategy strat)
void kDebugPrint(kStrategy strat)