 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
|
ideal | k_gnc_gr_bba (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing) |
|
ideal | k_gnc_gr_mora (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing) |
|
ideal | k_sca_gr_bba (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing) |
| Modified Plural's Buchberger's algorithmus. More...
|
|
ideal | k_sca_bba (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing) |
| Modified modern Sinuglar Buchberger's algorithm. More...
|
|
ideal | k_sca_mora (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing) |
| Modified modern Sinuglar Mora's algorithm. More...
|
|
◆ k_gnc_gr_bba()
Definition at line 1030 of file gr_kstd2.cc.
1035 PrintS(
"<gnc_gr_bba>\n");
1076 while (strat->Ll >= 0)
1080 if (strat->Ll== 0) strat->interpt=
TRUE;
1091 while (strat->Ll >= 0)
deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1095 strat->P = strat->L[strat->Ll];
1099 if (strat->P.p !=
NULL)
1100 if (
pNext(strat->P.p) == strat->tail)
1117 #ifdef HAVE_RATGRING
1141 if (strat->P.p !=
NULL)
1144 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
1145 &olddeg,&reduc,strat, red_result);
1157 strat->red(&strat->P,strat);
1166 if (strat->P.p !=
NULL)
1175 #ifdef HAVE_RATGRING
1181 PrintS(
"unit element detected:");
1185 strat->P.p =
pOne();
1190 int pos=
posInS(strat,strat->sl,strat->P.p, strat->P.ecart);
1194 if ((strat->syzComp==0)||(!strat->homog))
1196 #ifdef HAVE_RATGRING
1199 strat->P.p =
redtailBba(strat->P.p,pos-1,strat);
1207 if ((strat->syzComp==0)||(!strat->homog))
1209 strat->P.p =
redtailBba(strat->P.p,pos-1,strat);
1223 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat);
1225 if (strat->sl==-1) pos=0;
1226 else pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
1228 strat->enterS(strat->P,pos,strat,-1);
1249 clearS(strat->S[
j],strat->sevS[
j],&
k,&
j,strat);
1281 PrintS(
"</gnc_gr_bba>\n");
1286 return (strat->Shdl);
◆ k_gnc_gr_mora()
Definition at line 1289 of file gr_kstd2.cc.
1293 WarnS(
"Sorry, non-commutative mora is not yet implemented!");
◆ k_sca_bba()
Modified modern Sinuglar Buchberger's algorithm.
Definition at line 368 of file sca.cc.
375 PrintS(
"\n\n<sca_bba>\n\n");
425 strat->no_prod_crit = ! bIsSCA;
457 strat->use_buckets = 1;
462 withT = ! strat->homog;
467 #undef HAVE_TAIL_RING
469 #ifdef HAVE_TAIL_RING
491 for (
int iNewElement = strat->newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
493 const poly pSave = tempF->m[iNewElement];
499 const poly p_next =
pNext(pSave);
502 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
523 strat->initEcart(&
h);
529 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
531 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
538 while (strat->Ll >= 0)
544 if (strat->Ll== 0) strat->interpt=
TRUE;
558 while ((strat->Ll >= 0)
559 && ( (strat->homog==
isHomog) || strat->L[strat->Ll].is_special || ((strat->L[strat->Ll].p1!=
NULL) && (strat->L[strat->Ll].p2!=
NULL)) )
567 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
570 if (strat->Ll<0)
break;
571 else strat->noClearS=
TRUE;
575 strat->P = strat->L[strat->Ll];
581 if(strat->P.IsNull())
continue;
583 if (
pNext(strat->P.p) == strat->tail)
589 if (strat->P.p!=
NULL) strat->initEcart(&strat->P);
593 if(strat->P.IsNull())
continue;
595 if (strat->P.p1 ==
NULL)
602 strat->P.PrepareRed(strat->use_buckets);
606 message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
607 &olddeg,&reduc,strat, red_result);
610 red_result = strat->red(&strat->P,strat);
620 strat->P.GetP(strat->lmBin);
622 int pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
627 strat->P.pCleardenom();
630 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
631 strat->P.pCleardenom();
638 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
675 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
678 strat->enterS(strat->P, pos, strat, strat->tl);
687 const poly pSave = strat->P.p;
688 const poly p_next =
pNext(pSave);
692 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
717 strat->initEcart(&
h);
723 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
725 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
732 strat->initEcart(&
h);
734 h.PrepareRed(strat->use_buckets);
737 red_result = strat->red(&
h,strat);
740 if (red_result != 1)
continue;
743 int pos =
posInS(strat,strat->sl,
h.p,
h.ecart);
769 strat->initEcart(&
h);
774 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
776 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
835 ideal I = strat->Shdl;
843 PrintS(
"\n\n</sca_bba>\n\n");
848 return (strat->Shdl);
◆ k_sca_gr_bba()
Modified Plural's Buchberger's algorithmus.
Definition at line 95 of file sca.cc.
141 strat->no_prod_crit = ! bIsSCA;
147 PrintS(
"ideal tempF: \n");
149 PrintS(
"ideal tempQ: \n");
176 for(; strat->Ll >= 0;
187 if (strat->Ll== 0) strat->interpt=
TRUE;
197 while (strat->Ll >= 0)
deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
202 strat->P = strat->L[strat->Ll];
208 if(strat->P.IsNull())
continue;
211 if(
pNext(strat->P.p) == strat->tail )
218 if(strat->P.IsNull())
continue;
225 strat->initEcart(&strat->P);
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;
274 strat->initEcart(&
h);
298 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
301 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
344 ideal I = strat->Shdl;
358 return (strat->Shdl);
◆ k_sca_mora()
Modified modern Sinuglar Mora's algorithm.
Definition at line 885 of file sca.cc.
905 assume( !bIdHomog || strat->homog );
907 strat->homog = strat->homog && bIdHomog;
910 assume( strat->homog == bIdHomog );
913 strat->update =
TRUE;
927 strat->kHEdgeFound =
TRUE;
929 if (strat->kHEdgeFound && strat->update)
937 strat->posInLOld = strat->posInL;
938 strat->posInLOldFlag =
FALSE;
958 #undef HAVE_TAIL_RING
960 #ifdef HAVE_TAIL_RING
972 for (
int iNewElement = strat->newIdeal; iNewElement <
IDELEMS(tempF); iNewElement++)
975 const poly pSave = tempF->m[iNewElement];
981 const poly p_next =
pNext(pSave);
984 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
1005 strat->initEcart(&
h);
1010 if (strat->Ll != -1)
1011 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
1013 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
1020 while (strat->Ll >= 0)
1027 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()>
Kstd1_deg))
1032 while ((strat->Ll >= 0)
1033 && (strat->L[strat->Ll].p1!=
NULL) && (strat->L[strat->Ll].p2!=
NULL)
1034 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()>
Kstd1_deg)
1037 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1043 if (strat->Ll<0)
break;
1044 else strat->noClearS=
TRUE;
1046 strat->P = strat->L[strat->Ll];
1047 if (strat->Ll==0) strat->interpt=
TRUE;
1053 if(strat->P.IsNull())
continue;
1056 if(
pNext(strat->P.p) == strat->tail )
1065 if (strat->P.p1 ==
NULL)
1068 strat->P.SetLength(strat->length_pLength);
1069 strat->P.PrepareRed(strat->use_buckets);
1072 if (!strat->P.IsNull())
1076 message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
1078 red_result = strat->red(&strat->P,strat);
1081 if (! strat->P.IsNull())
1090 strat->P.p =
redtail(&(strat->P),strat->sl,strat);
1092 if ((!strat->noTailReduction) && (!strat->honey))
1093 strat->initEcart(&strat->P);
1098 strat->P.pCleardenom();
1103 enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
1105 strat->enterS(strat->P,
1106 posInS(strat,strat->sl,strat->P.p, strat->P.ecart),
1115 const poly pSave = strat->P.p;
1116 const poly p_next =
pNext(pSave);
1119 for(
unsigned int i = m_iFirstAltVar;
i <= m_iLastAltVar;
i++ )
1140 strat->initEcart(&
h);
1145 if (strat->Ll != -1)
1146 pos = strat->posInL(strat->L,strat->Ll,&
h,strat);
1148 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,pos);
1153 memset(&strat->P,0,
sizeof(strat->P));
1157 if (strat->kHEdgeFound)
1169 while (strat->Ll >= 0)
deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1182 if (strat->kHEdge!=
NULL)
1188 strat->update =
TRUE;
1189 strat->lastAxis = 0;
1209 return (strat->Shdl);
◆ gnc_gr_bba
◆ gnc_gr_mora
◆ nc_NF
◆ sca_bba
◆ sca_gr_bba
◆ sca_mora
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
void updateL(kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
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 pNorm(poly p, const ring R=currRing)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
void rDebugPrint(const ring r)
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
void reorderL(kStrategy strat)
poly redtail(LObject *L, int end_pos, kStrategy strat)
std::vector< std::vector< int > > p_new(ideal Xo, ideal Sigma)
#define TEST_OPT_MULTBOUND
void updateResult(ideal r, ideal Q, kStrategy strat)
int posInT110(const TSet set, const int length, LObject &p)
ideal kInterRedOld(ideal F, ideal Q)
void p_wrp(poly p, ring lmRing, ring tailRing)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
void mu(int **points, int sizePoints)
VAR int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
static short rVar(const ring r)
#define rVar(r) (r->N)
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
#define TEST_OPT_INTSTRATEGY
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN p_LmIsConstantRat(const poly p, const ring r)
void firstUpdate(kStrategy strat)
static BOOLEAN kMoraUseBucket(kStrategy)
#define TEST_OPT_NOT_BUCKETS
void PrintS(const char *s)
#define omFreeSize(addr, size)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
static short scaFirstAltVar(ring r)
static BOOLEAN rField_is_Ring(const ring r)
void completeReduce(kStrategy strat, BOOLEAN withT)
void exitBuchMora(kStrategy strat)
static BOOLEAN rIsRatGRing(const ring r)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
static bool id_IsSCAHomogeneous(const ideal id, const intvec *wCx, const intvec *wCy, const ring r)
poly p_Cleardenom(poly p, const ring r)
void initBuchMoraPos(kStrategy strat)
void addLObject(LObject &h, kStrategy &strat)
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
void messageStat(int hilbcount, kStrategy strat)
void kDebugPrint(kStrategy strat)
poly nc_rat_CreateSpoly(poly pp1, poly pp2, int ishift, const ring r)
void initBba(kStrategy strat)
static void p_Delete(poly *p, const ring r)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
void rWrite(ring r, BOOLEAN details)
VAR int(* test_PosInT)(const TSet T, const int tl, LObject &h)
static short scaLastAltVar(ring r)
void initMora(ideal F, kStrategy strat)
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
ideal SCAQuotient(const ring r)
void cancelunit(LObject *L, BOOLEAN inNF)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
static void kDeleteLcm(LObject *P)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
static bool rIsSCA(const ring r)
void enterT(LObject &p, kStrategy strat, int atT)
EXTERN_VAR BBA_Proc gnc_gr_bba
int scMult0Int(ideal S, ideal Q, const ring tailRing)
void updateLHC(kStrategy strat)