MCPcopy Create free account
hub / github.com/Singular/Singular / Mfwalk

Function Mfwalk

Singular/walk.cc:8032–8202  ·  view source on GitHub ↗

* The implementation of the fractal walk algorithm * * * * The main procedure Mfwalk calls the recursive Subroutine * * rec_fractal_call to compute the wanted Groebner basis. * * At the main procedur we compute the reduced Groebner basis w.r.t. a "fast"

Source from the content-addressed store, hash-verified

8030 * of a matrix. This matrix defines the given monomial order, e.g. "lp" *
8031 *******************************************************************************/
8032ideal Mfwalk(ideal G, intvec* ivstart, intvec* ivtarget,
8033 int reduction, int printout)
8034{
8035 BITSET save1 = si_opt_1; // save current options
8036 if(reduction == 0)
8037 {
8038 si_opt_1 &= (~Sy_bit(OPT_REDSB)); // no reduced Groebner basis
8039 //si_opt_1 &= (~Sy_bit(OPT_REDTAIL)); // not tail reductions
8040 }
8041 Set_Error(FALSE);
8042 Overflow_Error = FALSE;
8043 //Print("// pSetm_Error = (%d)", ErrorCheck());
8044 //Print("\n// ring ro = %s;", rString(currRing));
8045
8046 nnflow = 0;
8047 Xngleich = 0;
8048 Xcall = 0;
8049#ifdef TIME_TEST
8050 xtif=0; xtstd=0; xtlift=0; xtred=0; xtnw=0; xtextra=0;
8051 xftinput = clock();
8052#endif
8053 ring oldRing = currRing;
8054 int i, nV = currRing->N;
8055 XivNull = new intvec(nV);
8056 Xivinput = ivtarget;
8057 ngleich = 0;
8058#ifdef TIME_TEST
8059 to=clock();
8060#endif
8061 ideal I = MstdCC(G);
8062 G = NULL;
8063#ifdef TIME_TEST
8064 xftostd=clock()-to;
8065#endif
8066 Xsigma = ivstart;
8067
8068 Xnlev=nV;
8069
8070#ifdef FIRST_STEP_FRACTAL
8071 ideal Gw = MwalkInitialForm(I, ivstart);
8072 for(i=IDELEMS(Gw)-1; i>=0; i--)
8073 {
8074 if((Gw->m[i]!=NULL) // len >=0
8075 && (Gw->m[i]->next!=NULL) // len >=1
8076 && (Gw->m[i]->next->next!=NULL)) // len >=2
8077 {
8078 intvec* iv_dp = MivUnit(nV); // define (1,1,...,1)
8079 intvec* Mdp;
8080 if(ivstart->length() == nV)
8081 {
8082 if(MivSame(ivstart, iv_dp) != 1)
8083 Mdp = MivWeightOrderdp(ivstart);
8084 else
8085 Mdp = MivMatrixOrderdp(nV);
8086 }
8087 else
8088 {
8089 Mdp = ivstart;

Callers 1

jjSYSTEMFunction · 0.85

Calls 15

Set_ErrorFunction · 0.85
MstdCCFunction · 0.85
MwalkInitialFormFunction · 0.85
MivUnitFunction · 0.85
MivSameFunction · 0.85
MivWeightOrderdpFunction · 0.85
MivMatrixOrderdpFunction · 0.85
MfpertvectorFunction · 0.85
MivlpFunction · 0.85
MivCompFunction · 0.85
rParameterFunction · 0.85
DefRingParFunction · 0.85

Tested by

no test coverage detected