Changeset 266ddd in git for Singular


Ignore:
Timestamp:
Sep 18, 2016, 3:02:06 PM (8 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b2592e64df7670d96354bd000ad8cd57484ef3fe
Parents:
f8041a6e2257b969d9ab5a0d69148009ee342fd8
Message:
chg: some compiler warnings
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/silink.cc

    rf8041a r266ddd  
    192192
    193193//--------------------------------------------------------------------------
    194 BOOLEAN slSetRingDummy(si_link, ring r, BOOLEAN send)
     194BOOLEAN slSetRingDummy(si_link, ring r, BOOLEAN)
    195195{
    196196  if (currRing!=r) rChangeCurrRing(r);
  • Singular/newstruct.cc

    rf8041a r266ddd  
    638638}
    639639
    640 BOOLEAN newstruct_deserialize(blackbox **b, void **d, si_link f)
    641 {
    642   // newstruct is serialiazed as analog to a list,
     640BOOLEAN newstruct_deserialize(blackbox **, void **d, si_link f)
     641{
     642  // newstruct is serialized as analog to a list,
    643643  // just read a list and take data,
    644644  // rtyp must be set correctly (to the blackbox id) by routine calling
  • Singular/walk.cc

    rf8041a r266ddd  
    9696BOOLEAN Overflow_Error =  FALSE;
    9797
     98#ifdef TIME_TEST
    9899clock_t xtif, xtstd, xtlift, xtred, xtnw;
    99100clock_t xftostd, xtextra, xftinput, to;
     101#endif
    100102
    101103/****************************
     
    16201622
    16211623  intvec* result = new intvec(niv);
    1622   intvec* result1 = new intvec(niv);
    16231624  BOOLEAN nflow = FALSE;
    16241625
     
    17671768  int nG = IDELEMS(G);
    17681769  int n = nG-1;
    1769   Print("\n//** Ideal %s besteht aus %d Polynomen mit ", Ch, nG);
     1770  Print("\n// ** Ideal %s besteht aus %d Polynomen mit ", Ch, nG);
    17701771
    17711772  for(i=0; i<nG; i++)
     
    17841785  }
    17851786  PrintS(" Monomen.\n");
    1786   Print("//** %s besitzt %d Monome.", Ch, nmon);
     1787  Print("// ** %s besitzt %d Monome.", Ch, nmon);
    17871788  PrintLn();
    17881789}
     
    29072908{
    29082909  ring r = rCopy0(currRing,FALSE,FALSE);
    2909   int i, nv = currRing->N;
     2910  int nv = currRing->N;
    29102911
    29112912  int nb = rBlocks(currRing) + 1;
     
    29472948static void DefRingPar(intvec* va)
    29482949{
    2949   int i, nv = currRing->N;
     2950  int nv = currRing->N;
    29502951  int nb = rBlocks(currRing) + 1;
    29512952
     
    29552956  res->wvhdl = (int **)omAlloc0(nb * sizeof(int_ptr));
    29562957  res->wvhdl[0] = (int*) omAlloc(nv*sizeof(int));
    2957   for(i=0; i<nv; i++)
     2958  for(int i=0; i<nv; i++)
    29582959    res->wvhdl[0][i] = (*va)[i];
    29592960
     
    29962997static void DefRingParlp(void)
    29972998{
    2998   int i, nv = currRing->N;
     2999  int nv = currRing->N;
    29993000
    30003001  ring r=rCopy0(currRing,FALSE,FALSE);
     
    30323033//     r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr));
    30333034//
    3034 //     for(i=l-1;i>=0;i--)
     3035//     for(int i=l-1;i>=0;i--)
    30353036//     {
    30363037//       rParameter(r)[i]=omStrDup(rParameter(currRing)[i]);
     
    32163217    nwalk++;
    32173218    nstep++;
     3219#ifdef TIME_TEST
    32183220    to=clock();
     3221#endif
    32193222   // compute a next weight vector
    32203223    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
     3224#ifdef TIME_TEST
    32213225    xtnw=xtnw+clock()-to;
     3226#endif
    32223227
    32233228#ifdef PRINT_VECTORS
     
    32623267    }
    32633268    oldRing = currRing;
     3269#ifdef TIME_TEST
    32643270    to=clock();
     3271#endif
    32653272    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    32663273    Gomega = MwalkInitialForm(G, curr_weight);
     3274#ifdef TIME_TEST
    32673275    xtif=xtif+clock()-to;
     3276#endif
    32683277
    32693278#ifdef ENDWALKS
     
    33023311    Gomega1 = idrMoveR(Gomega, oldRing,currRing);
    33033312
     3313#ifdef TIME_TEST
    33043314    to=clock();
     3315#endif
    33053316    /* compute a reduced Groebner basis of <Gomega> w.r.t. "newRing" */
    33063317#ifdef  BUCHBERGER_ALG
     
    33103321    delete hilb_func;
    33113322#endif // BUCHBERGER_ALG
     3323#ifdef TIME_TEST
    33123324    xtstd=xtstd+clock()-to;
     3325#endif
    33133326    /* change the ring to oldRing */
    33143327    rChangeCurrRing(oldRing);
     
    33163329    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    33173330
     3331#ifdef TIME_TEST
    33183332    to=clock();
     3333#endif
    33193334    /* compute a reduced Groebner basis of <G> w.r.t. "newRing" */
    33203335    F = MLifttwoIdeal(Gomega2, M1, G);
     3336#ifdef TIME_TEST
    33213337    xtlift=xtlift+clock()-to;
     3338#endif
    33223339
    33233340    idDelete(&M1);
     
    33283345    F1 = idrMoveR(F, oldRing,currRing);
    33293346
     3347#ifdef TIME_TEST
    33303348    to=clock();
     3349#endif
    33313350    /* reduce the Groebner basis <G> w.r.t. new ring */
    33323351    G = kInterRedCC(F1, NULL);
     3352#ifdef TIME_TEST
    33333353    xtred=xtred+clock()-to;
     3354#endif
    33343355    idDelete(&F1);
    33353356
     
    39263947  // BOOLEAN nOverflow_Error = FALSE;
    39273948
     3949#ifdef TIME_TEST
    39283950  clock_t tproc=0;
    39293951  clock_t tinput = clock();
     3952#endif
    39303953
    39313954  int i,  nV = currRing->N;
     
    40194042      goto FIRST_STEP;
    40204043    }
     4044#ifdef TIME_TEST
    40214045    to=clock();
     4046#endif
    40224047    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    40234048    Gomega = MwalkInitialForm(G, curr_weight);
     4049#ifdef TIME_TEST
    40244050    xtif=xtif+clock()-to;
     4051#endif
    40254052
    40264053#ifndef  BUCHBERGER_ALG
     
    40484075    newRing = currRing;
    40494076    Gomega1 = idrMoveR(Gomega, oldRing,currRing);
     4077#ifdef TIME_TEST
    40504078    to=clock();
     4079#endif
    40514080    // compute a reduced Groebner basis of <Gomega> w.r.t. "newRing"
    40524081#ifdef  BUCHBERGER_ALG
     
    40564085    delete hilb_func;
    40574086#endif // BUCHBERGER_ALG
     4087#ifdef TIME_TEST
    40584088    xtstd=xtstd+clock()-to;
     4089#endif
    40594090    // change the ring to oldRing
    40604091    rChangeCurrRing(oldRing);
     
    40624093    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    40634094
     4095#ifdef TIME_TEST
    40644096     to=clock();
     4097#endif
    40654098    // compute a reduced Groebner basis of <G> w.r.t. "newRing" by the lifting process
    40664099    F = MLifttwoIdeal(Gomega2, M1, G);
     4100#ifdef TIME_TEST
    40674101    xtlift=xtlift+clock()-to;
     4102#endif
    40684103    idDelete(&M1);
    40694104    idDelete(&Gomega2);
     
    40744109    F1 = idrMoveR(F, oldRing,currRing);
    40754110
     4111#ifdef TIME_TEST
    40764112    to=clock();
     4113#endif
    40774114    // reduce the Groebner basis <G> w.r.t. new ring
    40784115    G = kInterRedCC(F1, NULL);
     4116#ifdef TIME_TEST
    40794117    xtred=xtred+clock()-to;
     4118#endif
    40804119    idDelete(&F1);
    40814120
     
    40854124    }
    40864125  FIRST_STEP:
     4126#ifdef TIME_TEST
    40874127    to=clock();
     4128#endif
    40884129    Overflow_Error = FALSE;
    40894130    // compute a next weight vector
    40904131    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
     4132#ifdef TIME_TEST
    40914133    xtnw=xtnw+clock()-to;
     4134#endif
    40924135#ifdef PRINT_VECTORS
    40934136    MivString(curr_weight, target_weight, next_weight);
     
    41264169        // REC_LAST_GB_ALT2:
    41274170        //nOverflow_Error = Overflow_Error;
     4171#ifdef TIME_TEST
    41284172        tproc=tproc+clock()-tinput;
     4173#endif
    41294174
    41304175        /*Print("\n// takes %d steps and calls \"Rec_LastGB\" (%d):",
     
    41654210      // nOverflow_Error = Overflow_Error;
    41664211      //Print("\n//  takes %d steps and calls \"Rec_LastGB (%d):", tp_deg+1);
     4212#ifdef TIME_TEST
    41674213      tproc=tproc+clock()-tinput;
     4214#endif
    41684215      F1 = Rec_LastGB(F1,curr_weight, orig_target_weight, tp_deg+1,nnwinC);
    41694216    }
     
    41984245        F1 = G;
    41994246      }
     4247#ifdef TIME_TEST
    42004248      to=clock();
     4249#endif
    42014250      // Print("\n// apply the Buchberger's alg in ring = %s",rString(currRing));
    42024251      // idElements(F1, "F1");
    42034252      G = MstdCC(F1);
     4253#ifdef TIME_TEST
    42044254      xtextra=xtextra+clock()-to;
     4255#endif
    42054256
    42064257
     
    44944545  intvec* next_weight1 = MkInterRedNextWeight(curr_weight,target_weight,G);
    44954546  intvec* next_weight2 = new intvec(nV);
    4496   intvec* next_weight22 = new intvec(nV);
    44974547  intvec* result = new intvec(nV);
    44984548  intvec* curr_weight1;
     
    47584808    }
    47594809    //Print("\n//REC_GB_Mwalk: Entering the %d-th step in the %d-th recursive:\n",nwalk,tp_deg);
     4810#ifdef TIME_TEST
    47604811    to = clock();
     4812#endif
    47614813    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    47624814    Gomega = MwalkInitialForm(G, curr_weight);
     4815#ifdef TIME_TEST
    47634816    xtif = xtif + clock()-to;
     4817#endif
    47644818
    47654819#ifndef  BUCHBERGER_ALG
     
    47884842    Gomega1 = idrMoveR(Gomega, oldRing,currRing);
    47894843
     4844#ifdef TIME_TEST
    47904845    to = clock();
     4846#endif
    47914847    // compute a reduced Groebner basis of <Gomega> w.r.t. "newRing"
    47924848#ifdef  BUCHBERGER_ALG
     
    47964852    delete hilb_func;
    47974853#endif
     4854#ifdef TIME_TEST
    47984855    xtstd = xtstd + clock() - to;
     4856#endif
    47994857
    48004858    // change the ring to oldRing
     
    48044862    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    48054863
     4864#ifdef TIME_TEST
    48064865    to = clock();
     4866#endif
    48074867    F = MLifttwoIdeal(Gomega2, M1, G);
     4868#ifdef TIME_TEST
    48084869    xtlift = xtlift + clock() -to;
     4870#endif
    48094871
    48104872    idDelete(&M1);
     
    48174879    F1 = idrMoveR(F, oldRing,currRing);
    48184880
     4881#ifdef TIME_TEST
    48194882    to = clock();
     4883#endif
    48204884    // reduce the Groebner basis <G> w.r.t. new ring
    48214885    G = kInterRedCC(F1, NULL);
     4886#ifdef TIME_TEST
    48224887    xtred = xtred + clock() -to;
     4888#endif
    48234889
    48244890    idDelete(&F1);
     
    48294895    }
    48304896  NEXT_STEP:
     4897#ifdef TIME_TEST
    48314898    to = clock();
     4899#endif
    48324900    // compute a next weight vector
    48334901    intvec* next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
    48344902
    48354903
     4904#ifdef TIME_TEST
    48364905    xtnw = xtnw + clock() - to;
     4906#endif
    48374907
    48384908#ifdef PRINT_VECTORS
     
    49345004        F1 = G;
    49355005      }
     5006#ifdef TIME_TEST
    49365007      to=clock();
     5008#endif
    49375009      // apply Buchberger alg to compute a red. GB of F1
    49385010      G = MstdCC(F1);
     5011#ifdef TIME_TEST
    49395012      xtextra=clock()-to;
     5013#endif
    49405014      idDelete(&F1);
    49415015      newRing = currRing;
     
    49665040  //Print("// pSetm_Error = (%d)", ErrorCheck());
    49675041
     5042#ifdef TIME_TEST
    49685043  clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0;
    4969   xtif=0; xtstd=0; xtlift=0; xtred=0; xtnw=0;
    49705044  tinput = clock();
    49715045  clock_t tim;
     5046  xtif=0; xtstd=0; xtlift=0; xtred=0; xtnw=0;
     5047#endif
    49725048  nstep=0;
    49735049  int i;
     
    49965072  ring XXRing = currRing;
    49975073
     5074#ifdef TIME_TEST
    49985075  to = clock();
     5076#endif
    49995077  // the monomial ordering of this current ring would be "dp"
    50005078  G = MstdCC(Go);
     5079#ifdef TIME_TEST
    50015080  tostd = clock()-to;
     5081#endif
    50025082
    50035083  if(currRing->order[0] == ringorder_a)
     
    50085088    nwalk ++;
    50095089    nstep ++;
     5090#ifdef TIME_TEST
    50105091    to = clock();
     5092#endif
    50115093    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    50125094    Gomega = MwalkInitialForm(G, curr_weight);
     5095#ifdef TIME_TEST
    50135096    tif = tif + clock()-to;
     5097#endif
    50145098    oldRing = currRing;
    50155099
     
    50185102      /* compute a reduced Groebner basis of Gomega w.r.t. >>_cw by
    50195103         the recursive changed perturbation walk alg. */
     5104#ifdef TIME_TEST
    50205105      tim = clock();
     5106#endif
    50215107#ifdef CHECK_IDEAL_MWALK
    50225108        Print("\n// **** Groebnerwalk took %d steps and ", nwalk);
     
    50415127#endif
    50425128*/
     5129#ifdef TIME_TEST
    50435130      to = clock();
     5131#endif
    50445132      F = MLifttwoIdeal(Gomega, M, G);
     5133#ifdef TIME_TEST
    50455134      xtlift = xtlift + clock() - to;
     5135#endif
    50465136
    50475137      idDelete(&Gomega);
     
    50895179      Gomega1 = idrMoveR(Gomega, oldRing,currRing);
    50905180
     5181#ifdef TIME_TEST
    50915182      to = clock();
     5183#endif
    50925184      // compute a reduced Groebner basis of <Gomega> w.r.t. "newRing"
    50935185#ifdef  BUCHBERGER_ALG
     
    50975189      delete hilb_func;
    50985190#endif
     5191#ifdef TIME_TEST
    50995192      tstd = tstd + clock() - to;
     5193#endif
    51005194
    51015195      // change the ring to oldRing
     
    51045198      Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    51055199
     5200#ifdef TIME_TEST
    51065201      to = clock();
     5202#endif
    51075203      // compute a representation of the generators of submod (M) with respect
    51085204      // to those of mod (Gomega).
    51095205      // Gomega is a reduced Groebner basis w.r.t. the current ring.
    51105206      F = MLifttwoIdeal(Gomega2, M1, G);
     5207#ifdef TIME_TEST
    51115208      tlift = tlift + clock() - to;
     5209#endif
    51125210
    51135211      idDelete(&M1);
     
    51205218    }
    51215219
     5220#ifdef TIME_TEST
    51225221    to = clock();
     5222#endif
    51235223    // reduce the Groebner basis <G> w.r.t. new ring
    51245224    G = kInterRedCC(F1, NULL);
     5225#ifdef TIME_TEST
    51255226    if(endwalks != 1)
    51265227    {
     
    51315232      xtred = xtred + clock() - to;
    51325233    }
     5234#endif
    51335235    idDelete(&F1);
    51345236    if(endwalks == 1)
     
    51375239    }
    51385240  NEXT_VECTOR:
     5241#ifdef TIME_TEST
    51395242    to = clock();
     5243#endif
    51405244    // compute a next weight vector
    51415245    intvec* next_weight = MkInterRedNextWeight(curr_weight,target_weight,G);
     5246#ifdef TIME_TEST
    51425247    tnw = tnw + clock() - to;
     5248#endif
    51435249#ifdef PRINT_VECTORS
    51445250    MivString(curr_weight, target_weight, next_weight);
     
    55165622  Set_Error(FALSE);
    55175623  Overflow_Error = FALSE;
    5518   BOOLEAN endwalks = FALSE;
    55195624#ifdef TIME_TEST
    55205625  clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0;
     
    60756180#endif
    60766181#ifdef ENDWALKS
     6182#ifdef TIME_TEST
    60776183      if(printout > 1)
    60786184      {
     
    60806186            ((double) clock())/1000000 -((double)tim) /1000000);
    60816187      }
     6188#endif
    60826189#endif
    60836190    }
     
    62276334      }
    62286335      // LastGB is "better" than the kStd subroutine
     6336#ifdef TIME_TEST
    62296337      to=clock();
     6338#endif
    62306339      ideal eF1;
    62316340      if(nP == 0 || tp_deg == 1 || MivSame(orig_target, exivlp) != 1){
     
    62416350        F2=NULL;
    62426351      }
     6352#ifdef TIME_TEST
    62436353      xtextra=clock()-to;
     6354#endif
    62446355      ring exTargetRing = currRing;
    62456356
     
    66356746    to = clock();
    66366747#endif
    6637     next_weight = next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
     6748    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
    66386749#ifdef TIME_TEST
    66396750    tnw = tnw + clock() - to;
     
    68586969  ring new_ring, testring;
    68596970  //ring extoRing;
    6860   ideal Gomega, Gomega1, Gomega2, FF, F, F1, Gresult, Gresult1, G1, Gt;
     6971  ideal Gomega, Gomega1, Gomega2, FF, F, Gresult, Gresult1, G1, Gt;
    68616972  int nwalks = 0;
    68626973  intvec* Mwlp;
     
    73327443    G = idrMoveR(F,oRing,currRing);
    73337444/*
    7334     F1 = idrMoveR(F, oRing,currRing);
     7445    ideal F1 = idrMoveR(F, oRing,currRing);
    73357446#ifdef TIME_TEST
    73367447    to=clock();
     
    73587469  ring new_ring, testring;
    73597470  //ring extoRing;
    7360   ideal Gomega, Gomega1, Gomega2, F, FF, F1, Gresult, Gresult1, G1, Gt;
     7471  ideal Gomega, Gomega1, Gomega2, F, FF, Gresult, Gresult1, G1, Gt;
     7472#ifdef TIME_TEST
     7473  ideal F1;
     7474#endif
    73617475  intvec* Mwlp;
    73627476#ifndef BUCHBERGER_ALG
     
    82998413  //Print("\n// ring ro = %s;", rString(currRing));
    83008414
     8415#ifdef TIME_TEST
    83018416  clock_t tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0, textra=0;
    8302 #ifdef TIME_TEST
    83038417  clock_t tinput = clock();
    83048418#endif
     
    83158429  //ideal  H1;
    83168430  ideal H2, Glp;
    8317   int nGB, endwalks = 0,  nwalkpert=0,  npertstep=0;
     8431  int nGB, endwalks = 0,  nwalkpert=0;
    83188432  intvec* Mlp =  MivMatrixOrderlp(nV);
    83198433  intvec* vector_tmp = new intvec(nV);
     
    83358449  newRing = currRing;
    83368450
     8451#ifdef TIME_TEST
    83378452  to=clock();
     8453#endif
    83388454  // compute a red. GB w.r.t. the help ring
    83398455  if(MivComp(curr_weight, iv_dp) == 1) //rOrdStr(currRing) = "dp"
     
    83498465    G = MstdCC(G);
    83508466  }
     8467#ifdef TIME_TEST
    83518468  tostd=clock()-to;
     8469#endif
    83528470
    83538471#ifdef REPRESENTATION_OF_SIGMA
     
    83728490    else
    83738491      rChangeCurrRing(VMrDefault(curr_weight));
     8492#ifdef TIME_TEST
    83748493    to=clock();
     8494#endif
    83758495    Gw = idrMoveR(G, exring,currRing);
    83768496    G = MstdCC(Gw);
    83778497    Gw = NULL;
     8498#ifdef TIME_TEST
    83788499    tostd=tostd+clock()-to;
     8500#endif
    83798501    //ivString(curr_weight,"rep. sigma");
    83808502    goto COMPUTE_NEW_VECTOR;
     
    83888510  while(1)
    83898511  {
     8512#ifdef TIME_TEST
    83908513    to=clock();
     8514#endif
    83918515    /* compute an initial form ideal of <G> w.r.t. "curr_vector" */
    83928516    Gomega = MwalkInitialForm(G, curr_weight);
     8517#ifdef TIME_TEST
    83938518    tif=tif+clock()-to;
     8519#endif
    83948520
    83958521#ifndef  BUCHBERGER_ALG
     
    84118537    Gomega1 = idrMoveR(Gomega, oldRing,currRing);
    84128538
     8539#ifdef TIME_TEST
    84138540    to=clock();
     8541#endif
    84148542    /* compute a reduced Groebner basis of <Gomega> w.r.t. "newRing" */
    84158543#ifdef  BUCHBERGER_ALG
     
    84198547    delete hilb_func;
    84208548#endif // BUCHBERGER_ALG
     8549#ifdef TIME_TEST
    84218550    tstd=tstd+clock()-to;
     8551#endif
    84228552
    84238553    /* change the ring to oldRing */
     
    84268556    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    84278557
     8558#ifdef TIME_TEST
    84288559    to=clock();
     8560#endif
    84298561    /* compute a representation of the generators of submod (M)
    84308562       with respect to those of mod (Gomega).
    84318563       Gomega is a reduced Groebner basis w.r.t. the current ring */
    84328564    F = MLifttwoIdeal(Gomega2, M1, G);
     8565#ifdef TIME_TEST
    84338566    tlift=tlift+clock()-to;
     8567#endif
    84348568
    84358569    idDelete(&M1);
     
    84418575    F1 = idrMoveR(F, oldRing,currRing);
    84428576
     8577#ifdef TIME_TEST
    84438578    to=clock();
     8579#endif
    84448580    /* reduce the Groebner basis <G> w.r.t. new ring */
    84458581    G = kInterRedCC(F1, NULL);
     8582#ifdef TIME_TEST
    84468583    tred=tred+clock()-to;
     8584#endif
    84478585    idDelete(&F1);
    84488586
     
    84528590    nwalk++;
    84538591    nwalkpert++;
     8592#ifdef TIME_TEST
    84548593    to=clock();
     8594#endif
    84558595    // compute a next weight vector
    84568596    next_weight = MwalkNextWeightCC(curr_weight,target_weight, G);
     8597#ifdef TIME_TEST
    84578598    tnw=tnw+clock()-to;
     8599#endif
    84588600#ifdef PRINT_VECTORS
    84598601    MivString(curr_weight, target_weight, next_weight);
     
    84958637      G1 = idrMoveR(G, newRing,currRing);
    84968638
     8639#ifdef TIME_TEST
    84978640      to=clock();
     8641#endif
    84988642      /*apply kStd or LastGB to compute  a lex. red. Groebner basis of <G>*/
    84998643      if(nP == 0 || MivSame(target_tmp, iv_lp) == 0){
     
    85118655        G = idrMoveR(G, newRing,currRing);
    85128656      }
     8657#ifdef TIME_TEST
    85138658      textra=clock()-to;
     8659#endif
    85148660      npert[endwalks]=nwalk-npert_tmp;
    85158661      npert_tmp = nwalk;
     
    86308776
    86318777
    8632       npertstep = nwalk;
    86338778      nwalkpert = 1;
    86348779      nsteppert ++;
     
    86988843  //Print("\n// ring ro = %s;", rString(currRing));
    86998844
     8845#ifdef TIME_TEST
    87008846  clock_t tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0, textra=0;
    8701 #ifdef TIME_TEST
    87028847  clock_t tinput = clock();
    87038848#endif
     
    87378882  newRing = currRing;
    87388883
     8884#ifdef TIME_TEST
    87398885  to=clock();
     8886#endif
    87408887  // compute a red. GB w.r.t. the help ring
    87418888  if(MivComp(curr_weight, iv_dp) == 1)
     
    87588905    G = MstdCC(G);
    87598906  }
     8907#ifdef TIME_TEST
    87608908  tostd=clock()-to;
     8909#endif
    87618910
    87628911#ifdef REPRESENTATION_OF_SIGMA
     
    87888937      rChangeCurrRing(VMrDefault(curr_weight));
    87898938    }
     8939#ifdef TIME_TEST
    87908940    to=clock();
     8941#endif
    87918942    Gw = idrMoveR(G, exring,currRing);
    87928943    G = MstdCC(Gw);
    87938944    Gw = NULL;
     8945#ifdef TIME_TEST
    87948946    tostd=tostd+clock()-to;
     8947#endif
    87958948    //ivString(curr_weight,"rep. sigma");
    87968949    goto COMPUTE_NEW_VECTOR;
     
    88048957  while(1)
    88058958  {
     8959#ifdef TIME_TEST
    88068960    to=clock();
     8961#endif
    88078962    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    88088963    Gomega = MwalkInitialForm(G, curr_weight);
     8964#ifdef TIME_TEST
    88098965    tif=tif+clock()-to;
     8966#endif
    88108967
    88118968#ifndef  BUCHBERGER_ALG
     
    88348991    Gomega1 = idrMoveR(Gomega, oldRing,currRing);
    88358992
     8993#ifdef TIME_TEST
    88368994    to=clock();
     8995#endif
    88378996    // compute a reduced Groebner basis of <Gomega> w.r.t. "newRing"
    88388997#ifdef  BUCHBERGER_ALG
     
    88429001    delete hilb_func;
    88439002#endif
     9003#ifdef TIME_TEST
    88449004    tstd=tstd+clock()-to;
     9005#endif
    88459006
    88469007    // change the ring to oldRing
     
    88499010    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    88509011
     9012#ifdef TIME_TEST
    88519013    to=clock();
     9014#endif
    88529015    // compute a representation of the generators of submod (M) with respect to those of mod (Gomega).
    88539016    // Gomega is a reduced Groebner basis w.r.t. the current ring
    88549017    F = MLifttwoIdeal(Gomega2, M1, G);
     9018#ifdef TIME_TEST
    88559019    tlift=tlift+clock()-to;
     9020#endif
    88569021
    88579022    idDelete(&M1);
     
    88639028    F1 = idrMoveR(F, oldRing,currRing);
    88649029
     9030#ifdef TIME_TEST
    88659031    to=clock();
     9032#endif
    88669033    // reduce the Groebner basis <G> w.r.t. new ring
    88679034    G = kInterRedCC(F1, NULL);
     9035#ifdef TIME_TEST
    88689036    tred=tred+clock()-to;
     9037#endif
    88699038    idDelete(&F1);
    88709039
     
    88739042    nwalk++;
    88749043    nwalkpert++;
     9044#ifdef TIME_TEST
    88759045    to=clock();
     9046#endif
    88769047    // compute a next weight vector
    88779048    //next_weight = MwalkNextWeightCC(curr_weight,target_weight, G);
     
    89539124    }*/
    89549125
     9126#ifdef TIME_TEST
    89559127    tnw=tnw+clock()-to;
     9128#endif
    89569129#ifdef PRINT_VECTORS
    89579130    MivString(curr_weight, target_weight, next_weight);
     
    90049177      G1 = idrMoveR(G, newRing,currRing);
    90059178
     9179#ifdef TIME_TEST
    90069180      to=clock();
     9181#endif
    90079182      // apply kStd or LastGB to compute  a lex. red. Groebner basis of <G>
    90089183      if(nP == 0 || MivSame(target_tmp, iv_lp) == 0)
     
    90229197        G = idrMoveR(G, newRing,currRing);
    90239198      }
     9199#ifdef TIME_TEST
    90249200      textra=clock()-to;
     9201#endif
    90259202      npert[endwalks]=nwalk-npert_tmp;
    90269203      npert_tmp = nwalk;
     
    92119388  Overflow_Error = FALSE;
    92129389 // BOOLEAN nOverflow_Error = FALSE;
     9390#ifdef TIME_TEST
    92139391  clock_t tproc=0;
    92149392  clock_t tinput=clock();
     9393#endif
    92159394  int i, nV = currRing->N;
    92169395
     
    93019480      goto FIRST_STEP;
    93029481    }
     9482#ifdef TIME_TEST
    93039483    to=clock();
     9484#endif
    93049485    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    93059486    Gomega = MwalkInitialForm(G, curr_weight);
     9487#ifdef TIME_TEST
    93069488    xtif=xtif+clock()-to;
     9489#endif
    93079490
    93089491#ifndef  BUCHBERGER_ALG
     
    93369519#endif
    93379520*/
     9521#ifdef TIME_TEST
    93389522    to=clock();
     9523#endif
    93399524    // compute a reduced Groebner basis of <Gomega> w.r.t. "newRing"
    93409525#ifdef  BUCHBERGER_ALG
     
    93449529    delete hilb_func;
    93459530#endif // BUCHBERGER_ALG
     9531#ifdef TIME_TEST
    93469532    xtstd=xtstd+clock()-to;
     9533#endif
    93479534
    93489535    // change the ring to oldRing
     
    93509537    M1 =  idrMoveR(M, newRing,currRing);
    93519538    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
     9539#ifdef TIME_TEST
    93529540    to=clock();
     9541#endif
    93539542
    93549543    // if(endwalks == 1){PrintS("\n//  Lifting is still working:");}
     
    93569545    // compute a reduced Groebner basis of <G> w.r.t. "newRing" by the lifting process
    93579546    F = MLifttwoIdeal(Gomega2, M1, G);
     9547#ifdef TIME_TEST
    93589548    xtlift=xtlift+clock()-to;
     9549#endif
    93599550
    93609551    idDelete(&M1);
     
    93659556    rChangeCurrRing(newRing);
    93669557    F1 = idrMoveR(F, oldRing,currRing);
     9558#ifdef TIME_TEST
    93679559    to=clock();
     9560#endif
    93689561    //if(endwalks == 1){ PrintS("\n//  InterRed is still working:");}
    93699562    // reduce the Groebner basis <G> w.r.t. the new ring
    93709563    G = kInterRedCC(F1, NULL);
     9564#ifdef TIME_TEST
    93719565    xtred=xtred+clock()-to;
     9566#endif
    93729567    idDelete(&F1);
    93739568
     
    93779572  FIRST_STEP:
    93789573    Overflow_Error=FALSE;
     9574#ifdef TIME_TEST
    93799575    to=clock();
     9576#endif
    93809577    // compute a next weight vector
    93819578    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
     9579#ifdef TIME_TEST
    93829580    xtnw=xtnw+clock()-to;
     9581#endif
    93839582#ifdef PRINT_VECTORS
    93849583    MivString(curr_weight, target_weight, next_weight);
     
    93909589      if(tp_deg > 1){
    93919590        //nOverflow_Error = Overflow_Error;
     9591#ifdef TIME_TEST
    93929592        tproc = tproc+clock()-tinput;
     9593#endif
    93939594        //Print("\n// A subroutine takes %d steps and calls \"Mpwalk\" (1,%d):", nwalk, tp_deg-1);
    93949595        G1 = Mpwalk_MAltwalk1(G, curr_weight, tp_deg-1);
     
    94399640    {
    94409641      //Print("\n// subroutine takes %d steps and applys \"std\"", nwalk);
     9642#ifdef TIME_TEST
    94419643      to=clock();
     9644#endif
    94429645      ideal G2 = MstdCC(G1);
     9646#ifdef TIME_TEST
    94439647      xtextra=xtextra+clock()-to;
     9648#endif
    94449649      idDelete(&G1);
    94459650      G1 = G2;
     
    94499654    {
    94509655      //nOverflow_Error = Overflow_Error;
     9656#ifdef TIME_TEST
    94519657      tproc = tproc+clock()-tinput;
     9658#endif
    94529659      // Print("\n// B subroutine takes %d steps and calls \"Mpwalk\" (1,%d) :", nwalk,  tp_deg-1);
    94539660      G1 = Mpwalk_MAltwalk1(G1, curr_weight, tp_deg-1);
     
    94819688  // Print("// pSetm_Error = (%d)", ErrorCheck());
    94829689
     9690#ifdef TIME_TEST
    94839691  xtif=0; xtstd=0; xtlift=0; xtred=0; xtnw=0; xtextra=0;
    94849692  xftinput = clock();
    94859693  clock_t tostd, tproc;
     9694#endif
    94869695
    94879696  nstep = 0;
     
    95129721  ring XXRing = currRing;
    95139722
     9723#ifdef TIME_TEST
    95149724  to=clock();
     9725#endif
    95159726  /* compute a pertubed weight vector of the original weight vector.
    95169727     The perturbation degree is recursive decrease until that vector
     
    95699780    op_deg --;
    95709781  }
     9782#ifdef TIME_TEST
    95719783  tostd=clock()-to;
     9784#endif
    95729785
    95739786  if(op_tmp != 1 )
     
    95839796    nstep ++;
    95849797
     9798#ifdef TIME_TEST
    95859799    to = clock();
     9800#endif
    95869801    // compute an initial form ideal of <G> w.r.t. "curr_vector"
    95879802    Gomega = MwalkInitialForm(G, curr_weight);
     9803#ifdef TIME_TEST
    95889804    xtif=xtif+clock()-to;
     9805#endif
    95899806#if 0
    95909807    if(Overflow_Error == TRUE)
     
    96239840    Gomega1 = idrMoveR(Gomega, oldRing,currRing);
    96249841
     9842#ifdef TIME_TEST
    96259843    to=clock();
     9844#endif
    96269845    // compute a reduced Groebner basis of <Gomega> w.r.t. "newRing"
    96279846#ifdef  BUCHBERGER_ALG
     
    96319850    delete hilb_func;
    96329851#endif // BUCHBERGER_ALG
     9852#ifdef TIME_TEST
    96339853    xtstd=xtstd+clock()-to;
     9854#endif
    96349855
    96359856    // change the ring to oldRing
     
    96389859    Gomega2 =  idrMoveR(Gomega1, newRing,currRing);
    96399860
     9861#ifdef TIME_TEST
    96409862    to=clock();
     9863#endif
    96419864    // compute a reduced Groebner basis of <G> w.r.t. "newRing" by the lifting process
    96429865    F = MLifttwoIdeal(Gomega2, M1, G);
     9866#ifdef TIME_TEST
    96439867    xtlift=xtlift+clock()-to;
     9868#endif
    96449869
    96459870    idDelete(&M1);
     
    96539878    oldRing=NULL;
    96549879
     9880#ifdef TIME_TEST
    96559881    to=clock();
     9882#endif
    96569883    // reduce the Groebner basis <G> w.r.t. new ring
    96579884    G = kInterRedCC(F1, NULL);
     9885#ifdef TIME_TEST
    96589886    xtred=xtred+clock()-to;
     9887#endif
    96599888    idDelete(&F1);
    96609889
     
    96649893    }
    96659894  NEXT_VECTOR:
     9895#ifdef TIME_TEST
    96669896    to=clock();
     9897#endif
    96679898    // compute a next weight vector
    96689899    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
     9900#ifdef TIME_TEST
    96699901    xtnw=xtnw+clock()-to;
     9902#endif
    96709903#ifdef PRINT_VECTORS
    96719904    MivString(curr_weight, target_weight, next_weight);
     
    97089941#ifdef TIME_TEST
    97099942        nOverflow_Error = Overflow_Error;
    9710 #endif
    97119943        tproc = clock()-xftinput;
     9944#endif
    97129945
    97139946        //Print("\n//  main routine takes %d steps and calls \"Mpwalk\" (1,%d):", nwalk,  tp_deg);
Note: See TracChangeset for help on using the changeset viewer.