7072 clock_t mtim = clock();
7079 clock_t tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0, textra=0;
7081 clock_t tinput = clock();
7083 int nsteppert=0,
i, nV =
currRing->N, nwalk=0, npert_tmp=0;
7084 int *npert=(
int*)
omAlloc(2*nV*
sizeof(
int));
7085 ideal Gomega,
M,F, G1, Gomega1, Gomega2, M1, F1;
7087 ring newRing, oldRing, lpRing;
7095 int nGB, endwalks = 0, nwalkpert=0, npertstep=0;
7098 #ifndef BUCHBERGER_ALG
7103 for(
i=nV-1;
i>0;
i--)
7104 (*last_omega)[
i] = 1;
7105 (*last_omega)[0] = 10000;
7109 for(
i=nV-1;
i>=0;
i--)
7110 (*target_weight)[
i] = (*target_tmp)[
i];
7117 if(
MivComp(curr_weight, iv_dp) == 1)
7131 #ifdef REPRESENTATION_OF_SIGMA
7137 if(
MivComp(curr_weight, iv_dp) == 1)
7138 MDp = MatrixOrderdp(nV);
7142 curr_weight = RepresentationMatrix_Dp(
G, MDp);
7156 tostd=tostd+clock()-
to;
7158 goto COMPUTE_NEW_VECTOR;
7173 #ifndef BUCHBERGER_ALG
7178 #endif // BUCHBERGER_ALG
7193 #ifdef BUCHBERGER_ALG
7198 #endif // BUCHBERGER_ALG
7199 tstd=tstd+clock()-
to;
7211 tlift=tlift+clock()-
to;
7224 tred=tred+clock()-
to;
7236 #ifdef PRINT_VECTORS
7237 MivString(curr_weight, target_weight, next_weight);
7250 OMEGA_OVERFLOW_TRAN_NEW:
7253 #ifdef TEST_OVERFLOW
7257 #ifdef CHECK_IDEAL_MWALK
7262 if(
MivSame(target_tmp, iv_lp) == 1)
7278 if(nP == 0 ||
MivSame(target_tmp, iv_lp) == 0){
7287 G =
LastGB(G1, curr_weight, nV-1);
7293 npert[endwalks]=nwalk-npert_tmp;
7302 if(
MivComp(next_weight, target_weight) == 1 ||
7303 MivComp(next_weight, curr_weight) == 1 )
7309 npert[endwalks]=nwalk-npert_tmp;
7315 if(endwalks == 1 &&
MivComp(next_weight, curr_weight) == 1){
7322 if(
MivSame(target_tmp, iv_lp) == 1)
7369 if(p->next !=
NULL &&
7370 p->next->next !=
NULL &&
7371 p->next->next->next !=
NULL)
7376 (*vector_tmp)[
i] = (*target_weight)[
i];
7378 delete target_weight;
7381 if(
MivComp(vector_tmp, target_weight)==1)
7386 goto OMEGA_OVERFLOW_TRAN_NEW;
7393 goto OMEGA_OVERFLOW_TRAN_NEW;
7403 if(plength3 ==
FALSE)
7429 goto COMPUTE_NEW_VECTOR;
7433 for(
i=nV-1;
i>=0;
i--)
7434 (*curr_weight)[
i] = (*next_weight)[
i];
7438 #ifdef TEST_OVERFLOW
7451 Print(
"\n// Computation took %d steps and %.2f sec",
7452 nwalk, ((
double) (clock()-mtim)/1000000));
7454 TimeStringFractal(tinput, tostd, tif, tstd, textra, tlift, tred, tnw);
static ideal MLifttwoIdeal(ideal Gw, ideal M, ideal G)
static int MivComp(intvec *iva, intvec *ivb)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw)
intvec * MivWeightOrderlp(intvec *ivstart)
static ideal LastGB(ideal G, intvec *curr_weight, int tp_deg)
static poly MpolyInitialForm(poly g, intvec *curr_weight)
int MivSame(intvec *u, intvec *v)
static char const ** rParameter(const ring r)
(r->cf->parameter)
void Set_Error(BOOLEAN f)
static void VMrDefaultlp(void)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static int islengthpoly2(ideal G)
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
void idDelete(ideal *h, ring r=currRing)
delete an ideal
static intvec * MwalkNextWeightCC(intvec *curr_weight, intvec *target_weight, ideal G)
intvec * MPertVectors(ideal G, intvec *ivtarget, int pdeg)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static ideal MstdhomCC(ideal G)
void rChangeCurrRing(ring r)
static void DefRingParlp(void)
static int isNolVector(intvec *hilb)
static ideal MstdCC(ideal G)
static void DefRingPar(intvec *va)
static ideal kInterRedCC(ideal F, ideal Q)
ideal id_Head(ideal h, const ring r)
static void MivString(intvec *iva, intvec *ivb, intvec *ivc)
intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
ideal MwalkInitialForm(ideal G, intvec *ivw)
intvec * MivMatrixOrderlp(int nV)
static ring VMrDefault(intvec *va)
#define pCopy(p)
return a copy of the poly