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

Function Mwalk

Singular/walk.cc:5303–5601  ·  view source on GitHub ↗

* THE GROEBNER WALK ALGORITHM * *******************************/

Source from the content-addressed store, hash-verified

5301 * THE GROEBNER WALK ALGORITHM *
5302 *******************************/
5303ideal Mwalk(ideal Go, intvec* orig_M, intvec* target_M,
5304 ring baseRing, int reduction, int printout)
5305{
5306 // save current options
5307 BITSET save1 = si_opt_1;
5308 if(reduction == 0)
5309 {
5310 si_opt_1 &= (~Sy_bit(OPT_REDSB)); // no reduced Groebner basis
5311 si_opt_1 &= (~Sy_bit(OPT_REDTAIL)); // not tail reductions
5312 }
5313 Set_Error(FALSE);
5314 Overflow_Error = FALSE;
5315 //BOOLEAN endwalks = FALSE;
5316#ifdef TIME_TEST
5317 clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0;
5318 xtif=0; xtstd=0; xtlift=0; xtred=0; xtnw=0;
5319 tinput = clock();
5320 clock_t tim;
5321#endif
5322 nstep=0;
5323 int i,nwalk;
5324 int nV = baseRing->N;
5325
5326 ideal Gomega, M, F, FF, Gomega1, Gomega2, M1;
5327 ring newRing;
5328 ring XXRing = baseRing;
5329 ring targetRing;
5330 intvec* ivNull = new intvec(nV);
5331 intvec* curr_weight = new intvec(nV);
5332 intvec* target_weight = new intvec(nV);
5333 intvec* exivlp = Mivlp(nV);
5334/*
5335 intvec* tmp_weight = new intvec(nV);
5336 for(i=0; i<nV; i++)
5337 {
5338 (*tmp_weight)[i] = (*orig_M)[i];
5339 }
5340*/
5341 for(i=0; i<nV; i++)
5342 {
5343 (*curr_weight)[i] = (*orig_M)[i];
5344 (*target_weight)[i] = (*target_M)[i];
5345 }
5346#ifndef BUCHBERGER_ALG
5347 intvec* hilb_func;
5348 // to avoid (1,0,...,0) as the target vector
5349 intvec* last_omega = new intvec(nV);
5350 for(i=nV-1; i>0; i--)
5351 {
5352 (*last_omega)[i] = 1;
5353 }
5354 (*last_omega)[0] = 10000;
5355#endif
5356 rComplete(currRing);
5357#ifdef CHECK_IDEAL_MWALK
5358 if(printout > 2)
5359 {
5360 idString(Go,"//** Mwalk: Go");

Callers 1

jjSYSTEMFunction · 0.85

Calls 15

Set_ErrorFunction · 0.85
MivlpFunction · 0.85
rCompleteFunction · 0.85
idStringFunction · 0.85
VMrDefaultFunction · 0.85
VMatrDefaultFunction · 0.85
VMrRefineFunction · 0.85
VMatrRefineFunction · 0.85
rChangeCurrRingFunction · 0.85
rStringFunction · 0.85
MstdCCFunction · 0.85
idrMoveRFunction · 0.85

Tested by

no test coverage detected