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

Function MAltwalk2

Singular/walk.cc:4281–4491  ·  view source on GitHub ↗

* walk + recursive LastGB * ******************************/

Source from the content-addressed store, hash-verified

4279 * walk + recursive LastGB *
4280 ******************************/
4281ideal MAltwalk2(ideal Go, intvec* curr_weight, intvec* target_weight)
4282{
4283 Set_Error(FALSE);
4284 Overflow_Error = FALSE;
4285 //BOOLEAN nOverflow_Error = FALSE;
4286 //Print("// pSetm_Error = (%d)", ErrorCheck());
4287#ifdef TIME_TEST
4288 xtif=0; xtstd=0; xtlift=0; xtred=0; xtnw=0; xtextra=0;
4289 xftinput = clock();
4290 clock_t tostd, tproc;
4291#endif
4292 nstep = 0;
4293 int i, nV = currRing->N;
4294 int nwalk=0, endwalks=0;
4295 // int nhilb = 1;
4296 ideal Gomega, M, F, Gomega1, Gomega2, M1, F1, G;
4297 //ideal G1;
4298 //ring endRing;
4299 ring newRing, oldRing;
4300 intvec* ivNull = new intvec(nV);
4301 intvec* next_weight;
4302 //intvec* extra_curr_weight = new intvec(nV);
4303 //intvec* hilb_func;
4304 intvec* exivlp = Mivlp(nV);
4305 ring XXRing = currRing;
4306
4307 //Print("\n// ring r_input = %s;", rString(currRing));
4308#ifdef TIME_TEST
4309 to = clock();
4310#endif
4311 /* compute the reduced Groebner basis of the given ideal w.r.t.
4312 a "fast" monomial order, e.g. degree reverse lex. order (dp) */
4313 G = MstdCC(Go);
4314#ifdef TIME_TEST
4315 tostd=clock()-to;
4316
4317 Print("\n// Computation of the first std took = %.2f sec",
4318 ((double) tostd)/1000000);
4319#endif
4320 if(currRing->order[0] == ringorder_a)
4321 {
4322 goto NEXT_VECTOR;
4323 }
4324 while(1)
4325 {
4326 nwalk ++;
4327 nstep ++;
4328#ifdef TIME_TEST
4329 to = clock();
4330#endif
4331 /* compute an initial form ideal of <G> w.r.t. "curr_vector" */
4332 Gomega = MwalkInitialForm(G, curr_weight);
4333#ifdef TIME_TEST
4334 xtif=xtif+clock()-to;
4335#endif
4336/*
4337 if(Overflow_Error == TRUE)
4338 {

Callers 1

jjSYSTEMFunction · 0.85

Calls 15

Set_ErrorFunction · 0.85
MivlpFunction · 0.85
MstdCCFunction · 0.85
MwalkInitialFormFunction · 0.85
rParameterFunction · 0.85
DefRingParFunction · 0.85
rChangeCurrRingFunction · 0.85
VMrDefaultFunction · 0.85
idrMoveRFunction · 0.85
MstdhomCCFunction · 0.85
MLifttwoIdealFunction · 0.85
kInterRedCCFunction · 0.85

Tested by

no test coverage detected