 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
|
static BOOLEAN | kMoraUseBucket (kStrategy strat) |
|
static void | kOptimizeLDeg (pLDegProc ldeg, kStrategy strat) |
|
static int | doRed (LObject *h, TObject *with, BOOLEAN intoT, kStrategy strat, bool redMoraNF) |
|
int | redEcart (LObject *h, kStrategy strat) |
|
int | redRiloc (LObject *h, kStrategy strat) |
|
int | redFirst (LObject *h, kStrategy strat) |
|
static poly | redMoraNF (poly h, kStrategy strat, int flag) |
|
static poly | redMoraNFRing (poly h, kStrategy strat, int flag) |
|
void | reorderL (kStrategy strat) |
|
void | reorderT (kStrategy strat) |
|
void | missingAxis (int *last, kStrategy strat) |
|
BOOLEAN | hasPurePower (const poly p, int last, int *length, kStrategy strat) |
|
BOOLEAN | hasPurePower (LObject *L, int last, int *length, kStrategy strat) |
|
int | posInL10 (const LSet set, const int length, LObject *p, const kStrategy strat) |
|
void | updateL (kStrategy strat) |
|
void | updateLHC (kStrategy strat) |
|
void | updateT (kStrategy strat) |
|
void | firstUpdate (kStrategy strat) |
|
void | enterSMora (LObject &p, int atS, kStrategy strat, int atR=-1) |
|
void | enterSMoraNF (LObject &p, int atS, kStrategy strat, int atR=-1) |
|
void | initBba (kStrategy strat) |
|
void | initSba (ideal F, kStrategy strat) |
|
void | initMora (ideal F, kStrategy strat) |
|
void | kDebugPrint (kStrategy strat) |
|
ideal | mora (ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat) |
|
poly | kNF1 (ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce) |
|
ideal | kNF1 (ideal F, ideal Q, ideal q, kStrategy strat, int lazyReduce) |
|
long | kModDeg (poly p, ring r) |
|
long | kHomModDeg (poly p, ring r) |
|
ideal | kStd (ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp) |
|
ideal | kSba (ideal F, ideal Q, tHomog h, intvec **w, int sbaOrder, int arri, intvec *hilb, int syzComp, int newIdeal, intvec *vw) |
|
ideal | kStdShift (ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, BOOLEAN rightGB) |
|
ideal | kMin_std (ideal F, ideal Q, tHomog h, intvec **w, ideal &M, intvec *hilb, int syzComp, int reduced) |
|
poly | kNF (ideal F, ideal Q, poly p, int syzComp, int lazyReduce) |
|
poly | kNFBound (ideal F, ideal Q, poly p, int bound, int syzComp, int lazyReduce) |
|
ideal | kNF (ideal F, ideal Q, ideal p, int syzComp, int lazyReduce) |
|
ideal | kNFBound (ideal F, ideal Q, ideal p, int bound, int syzComp, int lazyReduce) |
|
poly | k_NF (ideal F, ideal Q, poly p, int syzComp, int lazyReduce, const ring _currRing) |
| NOTE: this is just a wrapper which sets currRing for the actual kNF call. More...
|
|
ideal | kInterRedOld (ideal F, ideal Q) |
|
ideal | kInterRedBba (ideal F, ideal Q, int &need_retry) |
|
ideal | kInterRed (ideal F, ideal Q) |
|
◆ MORA_USE_BUCKETS
◆ PRE_INTEGER_CHECK
#define PRE_INTEGER_CHECK 0 |
◆ doRed()
Definition at line 115 of file kstd1.cc.
143 if (ret < 0)
return ret;
◆ enterSMora()
◆ enterSMoraNF()
◆ firstUpdate()
Definition at line 1202 of file kstd1.cc.
1218 for (
i=strat->
Ll;
i>=0;
i--)
1220 strat->
L[
i].SetpFDeg();
1222 for (
i=strat->
tl;
i>=0;
i--)
1224 strat->
T[
i].SetpFDeg();
◆ hasPurePower() [1/2]
◆ hasPurePower() [2/2]
◆ initBba()
◆ initMora()
◆ initSba()
◆ k_NF()
poly k_NF |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
p, |
|
|
int |
syzComp, |
|
|
int |
lazyReduce, |
|
|
const ring |
_currRing |
|
) |
| |
NOTE: this is just a wrapper which sets currRing for the actual kNF call.
Definition at line 3034 of file kstd1.cc.
3039 poly ret =
kNF(F,
Q,
p, syzComp, lazyReduce);
◆ kDebugPrint()
Definition at line 11940 of file kutil.cc.
11956 else Print(
"%p\n",(
void*)strat->
red);
11975 #ifdef HAVE_MORE_POS_IN_T
12013 PrintS(
"initEcartPair: ");
12017 Print(
"homog=%d, LazyDegree=%d, LazyPass=%d, ak=%d,\n",
12019 Print(
"honey=%d, sugarCrit=%d, Gebauer=%d, noTailReduction=%d, use_buckets=%d\n",
12025 Print(
"posInLDependsOnLength=%d\n",
12057 PrintS(
"currRing->pFDeg: ");
12072 PrintS(
"ecartWeights: ");
◆ kHomModDeg()
long kHomModDeg |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
Definition at line 2074 of file kstd1.cc.
2080 for (
i=r->N;
i>0;
i--)
2085 return j+(*kModW)[
i-1];
◆ kInterRed()
ideal kInterRed |
( |
ideal |
F, |
|
|
ideal |
Q |
|
) |
| |
Definition at line 3399 of file kstd1.cc.
3446 while (need_retry && (counter>0))
3452 int new_elems=
idElem(res1);
3453 counter -= (new_elems >= elems);
3456 if (
idElem(res1)<=1) need_retry=0;
◆ kInterRedBba()
ideal kInterRedBba |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
int & |
need_retry |
|
) |
| |
Definition at line 3139 of file kstd1.cc.
3197 withT = ! strat->
homog;
3202 #ifdef HAVE_TAIL_RING
3207 while (strat->
Ll >= 0)
3214 strat->
P = strat->
L[strat->
Ll];
3217 if (strat->
P.p1 ==
NULL)
3223 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3231 &olddeg,&reduc,strat, red_result);
3234 red_result = strat->red(&strat->P,strat);
3238 if (red_result == 1)
3244 strat->P.GetP(strat->lmBin);
3246 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
3253 strat->P.pCleardenom();
3257 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
3258 strat->P.pCleardenom();
3266 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
3278 strat->enterS(strat->P, pos, strat, strat->tl);
3286 for(;ii<=strat->sl;ii++)
3289 memset(&
h,0,
sizeof(
h));
3290 h.tailRing=strat->tailRing;
3291 h.p=strat->S[ii]; strat->S[ii]=
NULL;
3292 strat->initEcart(&
h);
3293 h.sev=strat->sevS[ii];
3297 if (strat->T[jj].p==
h.p)
3299 strat->T[jj].p=
NULL;
3302 memmove(&(strat->T[jj]),&(strat->T[jj+1]),
3303 (strat->tl-jj)*
sizeof(strat->T[jj]));
3304 memmove(&(strat->sevT[jj]),&(strat->sevT[jj+1]),
3305 (strat->tl-jj)*
sizeof(strat->sevT[jj]));
3312 int lpos=strat->posInL(strat->L,strat->Ll,&
h,strat);
3313 enterL(&strat->L,&strat->Ll,&strat->Lmax,
h,lpos);
3317 Print(
"move S[%d] -> L[%d]: ",ii,pos);
3323 if (strat->fromQ!=
NULL)
3325 for(ii=pos+1;ii<=strat->sl;ii++) strat->fromQ[ii]=0;
3342 memset(&(strat->P), 0,
sizeof(strat->P));
3354 if (strat->completeReduce_retry)
3359 strat->completeReduce_retry=
FALSE;
3361 if (strat->completeReduce_retry)
3363 #ifdef HAVE_TAIL_RING
3364 if(
currRing->bitmask>strat->tailRing->bitmask)
3367 strat->completeReduce_retry=
FALSE;
3370 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
3373 if (strat->completeReduce_retry)
3395 ideal
res=strat->Shdl;
◆ kInterRedOld()
ideal kInterRedOld |
( |
ideal |
F, |
|
|
ideal |
Q |
|
) |
| |
◆ kMin_std()
ideal kMin_std |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
tHomog |
h, |
|
|
intvec ** |
w, |
|
|
ideal & |
M, |
|
|
intvec * |
hilb, |
|
|
int |
syzComp, |
|
|
int |
reduced |
|
) |
| |
Definition at line 2674 of file kstd1.cc.
2681 return idInit(1,F->rank);
2716 strat->
minim=(reduced % 2)+1;
2765 r=
mora(F,
Q,*
w,hilb,strat);
2772 r=
bba(F,
Q,*
w,hilb,strat);
2790 if ((delete_w)&&(temp_w!=
NULL))
delete temp_w;
2798 else if (strat->
M==
NULL)
2801 WarnS(
"no minimal generating set computed");
◆ kModDeg()
long kModDeg |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
Definition at line 2064 of file kstd1.cc.
2072 return o+(*kModW)[
i-1];
◆ kMoraUseBucket()
Definition at line 3475 of file kstd1.cc.
3478 #ifdef MORA_USE_BUCKETS
◆ kNF() [1/2]
ideal kNF |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
ideal |
p, |
|
|
int |
syzComp, |
|
|
int |
lazyReduce |
|
) |
| |
Definition at line 2920 of file kstd1.cc.
2963 #ifdef HAVE_SHIFTBBA
2966 WerrorS(
"No local ordering possible for shift algebra");
◆ kNF() [2/2]
poly kNF |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
p, |
|
|
int |
syzComp, |
|
|
int |
lazyReduce |
|
) |
| |
Definition at line 2823 of file kstd1.cc.
2859 #ifdef HAVE_SHIFTBBA
2862 WerrorS(
"No local ordering possible for shift algebra");
◆ kNF1() [1/2]
ideal kNF1 |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
ideal |
q, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
◆ kNF1() [2/2]
poly kNF1 |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
q, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
◆ kNFBound() [1/2]
ideal kNFBound |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
ideal |
p, |
|
|
int |
bound, |
|
|
int |
syzComp, |
|
|
int |
lazyReduce |
|
) |
| |
◆ kNFBound() [2/2]
poly kNFBound |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
p, |
|
|
int |
bound, |
|
|
int |
syzComp, |
|
|
int |
lazyReduce |
|
) |
| |
◆ kOptimizeLDeg()
◆ kSba()
ideal kSba |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
tHomog |
h, |
|
|
intvec ** |
w, |
|
|
int |
sbaOrder, |
|
|
int |
arri, |
|
|
intvec * |
hilb, |
|
|
int |
syzComp, |
|
|
int |
newIdeal, |
|
|
intvec * |
vw |
|
) |
| |
Definition at line 2272 of file kstd1.cc.
2277 return idInit(1,F->rank);
2377 r=
mora(F,
Q,*
w,hilb,strat);
2385 r=
sba(F,
Q,*
w,hilb,strat);
2413 bool sigdrop =
TRUE;
2415 int totalsbaruns = 1,blockedreductions = 20,blockred = 0,loops = 0;
2416 while(sigdrop && (loops < totalsbaruns || totalsbaruns == -1)
2417 && (blockred <= blockedreductions))
2528 r=
mora(F,
Q,*
w,hilb,strat);
2535 r=
sba(r,
Q,*
w,hilb,strat);
2560 if(sigdrop || blockred > blockedreductions)
2562 r =
kStd(r,
Q,
h,
w, hilb, syzComp, newIdeal, vw);
◆ kStd()
Definition at line 2087 of file kstd1.cc.
2092 return idInit(1,F->rank);
2094 #ifdef HAVE_SHIFTBBA
2177 #if PRE_INTEGER_CHECK
2232 r=
mora(FCopy,
Q,*
w,hilb,strat);
2234 r=
bba(FCopy,
Q,*
w,hilb,strat);
2251 r=
mora(F,
Q,*
w,hilb,strat);
2253 r=
bba(F,
Q,*
w,hilb,strat);
◆ kStdShift()
Definition at line 2568 of file kstd1.cc.
2641 WerrorS(
"No local ordering possible for shift algebra");
◆ missingAxis()
void missingAxis |
( |
int * |
last, |
|
|
kStrategy |
strat |
|
) |
| |
◆ mora()
Definition at line 1516 of file kstd1.cc.
1522 int hilbeledeg=1,hilbcount=0;
1565 #ifdef HAVE_TAIL_RING
1579 while (strat->
Ll >= 0)
1586 while (strat->
Ll >= 0)
1591 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg))
1598 while ((strat->
Ll >= 0)
1599 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
1600 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg)
1609 if (strat->
Ll<0)
break;
1612 strat->
P = strat->
L[strat->
Ll];
1639 else if (strat->
P.p1 ==
NULL)
1647 if (!strat->
P.IsNull())
1651 message(strat->
P.ecart+strat->
P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
1653 red_result = strat->red(&strat->P,strat);
1657 if (! strat->P.IsNull())
1664 strat->P.pCleardenom();
1668 strat->P.p =
redtail(&(strat->P),strat->sl,strat);
1669 if (strat->P.p==
NULL)
1671 WerrorS(
"expoent overflow - wrong ordering");
1675 if ((!strat->noTailReduction) && (!strat->honey))
1676 strat->initEcart(&strat->P);
1680 if ((strat->P.p->next==
NULL)
1682 strat->P.pCleardenom();
1687 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
1689 enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
1691 strat->enterS(strat->P,
1692 posInS(strat,strat->sl,strat->P.p, strat->P.ecart),
1698 khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
1708 memset(&strat->P,0,
sizeof(strat->P));
1711 if (strat->kHEdgeFound)
1725 while (strat->Ll >= 0)
deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1738 if (strat->kHEdge!=
NULL)
1744 strat->update =
TRUE;
1745 strat->lastAxis = 0;
1763 return (strat->Shdl);
◆ posInL10()
Definition at line 1005 of file kstd1.cc.
1013 int op=
p->GetpFDeg() +
p->ecart;
1021 && (set[
j].GetpFDeg()+set[
j].ecart >= op))
◆ redEcart()
Definition at line 165 of file kstd1.cc.
173 d =
h->GetpFDeg()+
h->ecart;
175 h->SetShortExpVector();
185 ei = strat->
T[
j].ecart;
188 if (ei >
h->ecart && ii < strat->tl)
190 li = strat->
T[
j].length;
200 if (
i > strat->
tl)
break;
201 if ((strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
202 strat->
T[
i].length < li))
209 if (strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
210 strat->
T[
i].length < li))
215 ei = strat->
T[
i].ecart;
216 if (ei <= h->ecart)
break;
217 li = strat->
T[
i].length;
235 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
264 h->SetShortExpVector();
269 h->ecart = d-
h->GetpFDeg();
271 h->ecart = d-
h->GetpFDeg()+ei-
h->ecart;
275 h->ecart =
h->pLDeg(strat->
LDegLast) -
h->GetpFDeg();
282 if (strat->
honey)
h->SetLength();
292 d =
h->GetpFDeg()+
h->ecart;
299 && ((d >= reddeg) || (pass > strat->
LazyPass)))
305 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
327 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
332 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redFirst()
Definition at line 527 of file kstd1.cc.
530 if (
h->IsNull())
return 0;
539 d =
h->GetpFDeg() +
h->ecart;
542 h->SetShortExpVector();
548 h->SetDegStuffReturnLDeg(strat->
LDegLast);
579 h->SetShortExpVector();
592 h->SetDegStuffReturnLDeg(strat->
LDegLast);
602 if (strat->
T[
j].ecart <=
h->ecart)
603 h->ecart = d -
h->GetpFDeg();
605 h->ecart = d -
h->GetpFDeg() + strat->
T[
j].ecart -
h->ecart;
607 d =
h->GetpFDeg() +
h->ecart;
610 d =
h->SetDegStuffReturnLDeg(strat->
LDegLast);
619 && ((d >= reddeg) || (pass > strat->
LazyPass)))
624 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
642 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
647 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redMoraNF()
static poly redMoraNF |
( |
poly |
h, |
|
|
kStrategy |
strat, |
|
|
int |
flag |
|
) |
| |
|
static |
Definition at line 661 of file kstd1.cc.
668 int o =
H.SetpFDeg();
672 unsigned long not_sev = ~
H.sev;
689 int ei = strat->
T[
j].ecart;
690 int li = strat->
T[
j].length;
701 if (
j > strat->
tl)
break;
702 if (ei <=
H.ecart)
break;
703 if (((strat->
T[
j].ecart < ei)
704 || ((strat->
T[
j].ecart == ei)
705 && (strat->
T[
j].length < li)))
713 ei = strat->
T[
j].ecart;
714 li = strat->
T[
j].length;
◆ redMoraNFRing()
static poly redMoraNFRing |
( |
poly |
h, |
|
|
kStrategy |
strat, |
|
|
int |
flag |
|
) |
| |
|
static |
Definition at line 761 of file kstd1.cc.
768 int o =
H.SetpFDeg();
772 unsigned long not_sev = ~
H.sev;
790 int ei = strat->
T[
j].ecart;
791 int li = strat->
T[
j].length;
802 if (
j > strat->
tl)
break;
803 if (ei <=
H.ecart)
break;
804 if (((strat->
T[
j].ecart < ei)
805 || ((strat->
T[
j].ecart == ei)
806 && (strat->
T[
j].length < li)))
815 ei = strat->
T[
j].ecart;
816 li = strat->
T[
j].length;
◆ redRiloc()
Definition at line 341 of file kstd1.cc.
349 d =
h->GetpFDeg()+
h->ecart;
351 h->SetShortExpVector();
370 if (
h->GetLmTailRing() ==
NULL)
379 ei = strat->
T[
j].ecart;
381 if (ei >
h->ecart && ii < strat->tl)
383 li = strat->
T[
j].length;
393 if (
i > strat->
tl)
break;
394 if ((strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
395 strat->
T[
i].length < li))
404 if (strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
405 strat->
T[
i].length < li))
410 ei = strat->
T[
i].ecart;
411 if (ei <= h->ecart)
break;
412 li = strat->
T[
i].length;
430 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
431 if (at <= strat->Ll &&
pLmCmp(
h->p, strat->
L[strat->
Ll].p) != 0 && !
nEqual(
h->p->coef, strat->
L[strat->
Ll].p->coef))
460 h->SetShortExpVector();
465 h->ecart = d-
h->GetpFDeg();
467 h->ecart = d-
h->GetpFDeg()+ei-
h->ecart;
471 h->ecart =
h->pLDeg(strat->
LDegLast) -
h->GetpFDeg();
474 d =
h->GetpFDeg()+
h->ecart;
481 && ((d >= reddeg) || (pass > strat->
LazyPass)))
487 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
509 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
514 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ reorderL()
Definition at line 866 of file kstd1.cc.
872 for (
i=1;
i<=strat->
Ll;
i++)
874 at = strat->
posInL(strat->
L,
i-1,&(strat->
L[
i]),strat);
878 for (
j=
i-1;
j>=at;
j--) strat->
L[
j+1] = strat->
L[
j];
◆ reorderT()
Definition at line 886 of file kstd1.cc.
894 for (
i=1;
i<=strat->
tl;
i++)
896 if (strat->
T[
i-1].length > strat->
T[
i].length)
899 sev = strat->
sevT[
i];
905 if (strat->
T[
i].length > strat->
T[at].length)
break;
907 for (
j =
i-1;
j>at;
j--)
909 strat->
T[
j+1]=strat->
T[
j];
911 strat->
R[strat->
T[
j+1].i_r] = &(strat->
T[
j+1]);
914 strat->
sevT[at+1] = sev;
915 strat->
R[
p.i_r] = &(strat->
T[at+1]);
◆ updateL()
Definition at line 1038 of file kstd1.cc.
1049 p=strat->
L[strat->
Ll];
1050 strat->
L[strat->
Ll]=strat->
L[
j];
1083 strat->
L[
j].SetLmCurrRing();
1095 p=strat->
L[strat->
Ll];
1096 strat->
L[strat->
Ll]=strat->
L[
j];
◆ updateLHC()
Definition at line 1109 of file kstd1.cc.
1115 while (i <= strat->Ll)
1148 if (! strat->
L[
i].IsNull())
1150 strat->
L[
i].SetLmCurrRing();
1151 strat->
L[
i].SetpFDeg();
1153 = strat->
L[
i].pLDeg(strat->
LDegLast) - strat->
L[
i].GetpFDeg();
1160 if (strat->
L[
i].IsNull())
◆ updateT()
Definition at line 1176 of file kstd1.cc.
1182 while (i <= strat->tl)
1190 if (
p.p != strat->
T[
i].p)
◆ kHomW
◆ kModW
◆ kOptions
Initial value:
Definition at line 41 of file kstd1.cc.
◆ validOpts
void kEcartWeights(poly *s, int sl, short *eweight, const ring R)
BOOLEAN rHasGlobalOrdering(const ring r)
void updateL(kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
int idElem(const ideal F)
count non-zero elements
long pLDeg1(poly p, int *l, const ring r)
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
#define pIsConstant(p)
like above, except that Comp must be 0
void initBuchMoraCrit(kStrategy strat)
int redRiloc(LObject *h, kStrategy strat)
#define pGetComp(p)
Component.
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
int posInT17_c(const TSet set, const int length, LObject &p)
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
void pNorm(poly p, const ring R=currRing)
void cleanT(kStrategy strat)
static BOOLEAN rIsLPRing(const ring r)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
long pLDeg0c(poly p, int *l, const ring r)
int redEcart(LObject *h, kStrategy strat)
#define idDelete(H)
delete an ideal
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
void enterT_strong(LObject &p, kStrategy strat, int atT)
void khCheck(ideal Q, intvec *w, intvec *hilb, int &eledeg, int &count, kStrategy strat)
int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject *L)
return -1 if no divisor is found number of first divisor in S, otherwise
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
long pLDeg0(poly p, int *l, const ring r)
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
int posInL17_c(const LSet set, const int length, LObject *p, const kStrategy)
BOOLEAN arriRewCriterion(poly, unsigned long, poly, kStrategy strat, int start=0)
void enterSMora(LObject &p, int atS, kStrategy strat, int atR=-1)
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
void reorderL(kStrategy strat)
long pLDeg1_Totaldegree(poly p, int *l, const ring r)
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
poly kNF1(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
poly redtail(LObject *L, int end_pos, kStrategy strat)
int posInT17(const TSet set, const int length, LObject &p)
int posInT110Ring(const TSet set, const int length, LObject &p)
static void kOptimizeLDeg(pLDegProc ldeg, kStrategy strat)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
void(* chainCrit)(poly p, int ecart, kStrategy strat)
KINLINE unsigned long * initsevT()
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
#define TEST_OPT_MULTBOUND
void updateResult(ideal r, ideal Q, kStrategy strat)
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
void khCheckLocInhom(ideal Q, intvec *w, intvec *hilb, int &count, kStrategy strat)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
long totaldegreeWecart(poly p, ring r)
int posInT110(const TSet set, const int length, LObject &p)
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
static BOOLEAN length(leftv result, leftv arg)
#define __p_GetComp(p, r)
void updateS(BOOLEAN toT, kStrategy strat)
long pLDeg1c_Deg(poly p, int *l, const ring r)
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)
long pLDeg1c_WFirstTotalDegree(poly p, int *l, const ring r)
int posInT_EcartpLength(const TSet set, const int length, LObject &p)
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
poly p_KillSquares(const poly p, const short iFirstAltVar, const short iLastAltVar, const ring r)
int posInT17_cRing(const TSet set, const int length, LObject &p)
static BOOLEAN kMoraUseBucket(kStrategy strat)
long pLDegb(poly p, int *l, const ring r)
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
BOOLEAN hasPurePower(const poly p, int last, int *length, kStrategy strat)
int posInT19(const TSet set, const int length, LObject &p)
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int)
ideal mora(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static int rGetCurrSyzLimit(const ring r)
static unsigned pLength(poly a)
BOOLEAN newHEdge(kStrategy strat)
void chainCritOpt_1(poly, int, kStrategy strat)
long p_WFirstTotalDegree(poly p, const ring r)
static poly redMoraNF(poly h, kStrategy strat, int flag)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int(* red2)(LObject *L, kStrategy strat)
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
static short rVar(const ring r)
#define rVar(r) (r->N)
int posInLSpecial(const LSet set, const int length, LObject *p, const kStrategy)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
#define TEST_OPT_INTSTRATEGY
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void firstUpdate(kStrategy strat)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
int redRing(LObject *h, kStrategy strat)
char posInLDependsOnLength
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
void reorderT(kStrategy strat)
int posInT2(const TSet set, const int length, LObject &p)
#define TEST_OPT_NOT_BUCKETS
void initEcartNormal(TObject *h)
void PrintS(const char *s)
#define omFreeSize(addr, size)
long pLDeg1_WFirstTotalDegree(poly p, int *l, const ring r)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
int redEcart(LObject *h, kStrategy strat)
int posInT_pLength(const TSet set, const int length, LObject &p)
static short scaFirstAltVar(ring r)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN rField_is_Ring(const ring r)
long kModDeg(poly p, ring r)
int posInTrg0(const TSet set, const int length, LObject &p)
void completeReduce(kStrategy strat, BOOLEAN withT)
int posInL11Ringls(const LSet set, const int length, LObject *p, const kStrategy)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
KINLINE poly kNoetherTail()
void exitBuchMora(kStrategy strat)
void enterSSba(LObject &p, int atS, kStrategy strat, int atR)
int redFirst(LObject *h, kStrategy strat)
pFDegProc pOrigFDeg_TailRing
int posInL17Ring(const LSet set, const int length, LObject *p, const kStrategy)
static void p_LmDelete(poly p, const ring r)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start)
return -1 if no divisor is found number of first divisor in T, otherwise
long pLDeg1c_Totaldegree(poly p, int *l, const ring r)
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
#define TEST_OPT_STAIRCASEBOUND
int posInL11Ring(const LSet set, const int length, LObject *p, const kStrategy)
BOOLEAN(* rewCrit1)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
pShallowCopyDeleteProc pGetShallowCopyDeleteProc(ring, ring)
long pLDeg1c(poly p, int *l, const ring r)
void initBuchMoraPos(kStrategy strat)
void updateT(kStrategy strat)
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
void messageStat(int hilbcount, kStrategy strat)
int posInL15Ring(const LSet set, const int length, LObject *p, const kStrategy)
long p_WDegree(poly p, const ring r)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
#define TEST_OPT_RETURN_SB
void kDebugPrint(kStrategy strat)
static poly redMoraNFRing(poly h, kStrategy strat, int flag)
int posInT13(const TSet set, const int length, LObject &p)
int posInL13(const LSet set, const int length, LObject *p, const kStrategy)
ideal freegb(ideal F, ideal Q)
int posInL110Ring(const LSet set, const int length, LObject *p, const kStrategy)
poly preIntegerCheck(const ideal Forig, const ideal Q)
used for GB over ZZ: look for constant and monomial elements in the ideal background: any known const...
pLDegProc pOrigLDeg_TailRing
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int redSig(LObject *h, kStrategy strat)
void initBba(kStrategy strat)
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
long p_Deg(poly a, const ring r)
int posInL11(const LSet set, const int length, LObject *p, const kStrategy)
int posInL17_cRing(const LSet set, const int length, LObject *p, const kStrategy)
static void p_Delete(poly *p, const ring r)
static BOOLEAN rField_is_numeric(const ring r)
int posInL17(const LSet set, const int length, LObject *p, const kStrategy)
long maxdegreeWecart(poly p, int *l, ring r)
int posInT15Ring(const TSet set, const int length, LObject &p)
BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly, kStrategy strat, int start=0)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
void initBuchMoraPosRing(kStrategy strat)
void chainCritNormal(poly p, int ecart, kStrategy strat)
static int si_max(const int a, const int b)
static CanonicalForm bound(const CFMatrix &M)
#define pSetmComp(p)
TODO:
void enterSMora(LObject &p, int atS, kStrategy strat, int atR=-1)
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
long pLDeg1_Deg(poly p, int *l, const ring r)
int posInL110(const LSet set, const int length, LObject *p, const kStrategy)
int redRing_Z(LObject *h, kStrategy strat)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
void Werror(const char *fmt,...)
static short scaLastAltVar(ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
#define pp_Test(p, lmRing, tailRing)
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
void initMora(ideal F, kStrategy strat)
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
void WerrorS(const char *s)
static BOOLEAN rField_has_simple_inverse(const ring r)
void HEckeTest(poly pp, kStrategy strat)
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
ideal SCAQuotient(const ring r)
int posInT1(const TSet set, const int length, LObject &p)
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
int posInLrg0(const LSet set, const int length, LObject *p, const kStrategy)
long p_WTotaldegree(poly p, const ring r)
BOOLEAN(* rewCrit3)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int redFirst(LObject *h, kStrategy strat)
int posInT11Ring(const TSet set, const int length, LObject &p)
int posInL15(const LSet set, const int length, LObject *p, const kStrategy)
static int doRed(LObject *h, TObject *with, BOOLEAN intoT, kStrategy strat, bool redMoraNF)
void cancelunit(LObject *L, BOOLEAN inNF)
#define TEST_OPT_REDTHROUGH
static long p_Totaldegree(poly p, const ring r)
int posInT17Ring(const TSet set, const int length, LObject &p)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
int redLazy(LObject *h, kStrategy strat)
#define idSimpleAdd(A, B)
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(* initEcart)(TObject *L)
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
static BOOLEAN rIsSyzIndexRing(const ring r)
ideal sba(ideal F0, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
int(* red)(LObject *L, kStrategy strat)
long kHomModDeg(poly p, ring r)
void initEcartBBA(TObject *h)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
#define pCopy(p)
return a copy of the poly
#define SI_RESTORE_OPT1(A)
int(* posInT)(const TSet T, const int tl, LObject &h)
int posInT15(const TSet set, const int length, LObject &p)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
int posInT0(const TSet, const int length, LObject &)
static void kDeleteLcm(LObject *P)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
BOOLEAN rHasMixedOrdering(const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR=-1)
ideal kInterRed(ideal F, ideal Q)
static BOOLEAN rField_is_Z(const ring r)
static bool rIsSCA(const ring r)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
EXTERN_VAR short * ecartWeights
KINLINE TObject ** initR()
void initHilbCrit(ideal, ideal, intvec **hilb, kStrategy strat)
int redHoney(LObject *h, kStrategy strat)
static FORCE_INLINE BOOLEAN n_IsUnit(number n, const coeffs r)
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
void missingAxis(int *last, kStrategy strat)
void enterT(LObject &p, kStrategy strat, int atT)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
int posInT11(const TSet set, const int length, LObject &p)
int redSigRing(LObject *h, kStrategy strat)
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
int redHomog(LObject *h, kStrategy strat)
int scMult0Int(ideal S, ideal Q, const ring tailRing)
#define OPT_NOTREGULARITY
ideal kInterRedBba(ideal F, ideal Q, int &need_retry)
omError_t omTestMemory(int check_level)
void updateLHC(kStrategy strat)
void initS(ideal F, ideal Q, kStrategy strat)