Changeset 7d16bfd in git for Singular/walk.cc


Ignore:
Timestamp:
Nov 25, 2015, 5:53:28 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
3de8ef2ecb36a7d12cbf01da2fe987428f685594
Parents:
cf860bd81a97eb9d7215bc8cc0fbae130cee792e
Message:
fix: PRINT_VECTOR (walk.cc)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/walk.cc

    rcf860b r7d16bfd  
    2020
    2121//#define NEXT_VECTORS_CC
    22 #define PRINT_VECTORS //to print weight vectors
     22//#define PRINT_VECTORS //to print weight vectors
    2323
    2424#define INVEPS_SMALL_IN_FRACTAL  //to choose the small invers of epsilon
     
    990990  assume((iv->length())*(iv->length()) == iw->length());
    991991  int i,j, nR = iv->length();
    992  
     992
    993993  intvec* ivm = new intvec(nR*nR);
    994994
     
    21512151    {
    21522152      (*diff_weight)[j] = (*diff_weight1)[j];
    2153       mpz_set_si(vec[j], (*diff_weight)[j]);     
     2153      mpz_set_si(vec[j], (*diff_weight)[j]);
    21542154    }
    21552155    for(j=0; j<nRing; j++)
     
    22972297      for(j=0; j<nRing; j++)
    22982298      {
    2299         (*curr_weight)[j] = (*diff_weight1)[j]; 
     2299        (*curr_weight)[j] = (*diff_weight1)[j];
    23002300      }
    23012301      for(j=0; j<nRing; j++)
     
    28312831
    28322832  // complete ring intializations
    2833  
     2833
    28342834  rComplete(r);
    28352835
     
    32563256
    32573257  ideal Go = idCopy(G);
    3258  
     3258
    32593259  // check whether leading monomials of G and Gomega coincide
    32603260  // and return NULL if not
     
    32643264    {
    32653265      idDelete(&Go);
    3266       return NULL; 
     3266      return NULL;
    32673267    }
    32683268  }
     
    32743274      {
    32753275        p = pCopy(Gomega->m[i]);
    3276         lm = pCopy(Gomega->m[j]);
     3276        lm = pCopy(Gomega->m[j]);
    32773277        pIter(p);
    32783278        while(p!=NULL)
     
    32833283            {
    32843284              middle = TRUE;
    3285             }
     3285            }
    32863286            factor1 = singclap_pdivide(pHead(p),lm,currRing);
    32873287            factor2 = pMult(pCopy(factor1),pCopy(Go->m[j]));
     
    33033303  }
    33043304  idDelete(&Go);
    3305   return NULL; 
     3305  return NULL;
    33063306}
    33073307
     
    42544254    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
    42554255    xtnw=xtnw+clock()-to;
    4256 /*#ifdef PRINT_VECTORS
     4256#ifdef PRINT_VECTORS
    42574257    MivString(curr_weight, target_weight, next_weight);
    42584258#endif
    4259 */
    42604259    if(Overflow_Error == TRUE)
    42614260    {
     
    42924291        //nOverflow_Error = Overflow_Error;
    42934292        tproc=tproc+clock()-tinput;
    4294        
     4293
    42954294        /*Print("\n// takes %d steps and calls \"Rec_LastGB\" (%d):",
    42964295        nwalk, tp_deg+1);
     
    47034702    }
    47044703  }
    4705  
     4704
    47064705  // compute "perturbed" next weight vector
    47074706  if(pert_deg > 1)
     
    47164715  }
    47174716  if(MivSame(curr_weight,next_weight)==1 || Overflow_Error == TRUE)
    4718   { 
     4717  {
    47194718    Overflow_Error = FALSE;
    47204719    delete next_weight;
     
    47454744            (*result)[i] = (*next_weight1)[i];
    47464745          }
    4747         }   
     4746        }
    47484747      }
    47494748      else
     
    48224821  }
    48234822  if(test_w_in_ConeCC(G, result) == 1 && MivSame(curr_weight,result)==0)
    4824   { 
     4823  {
    48254824    delete curr_weight;
    48264825    delete next_weight1;
     
    54915490      PrintS("middle of Cone");
    54925491        idDelete(&G);
    5493         G = idCopy(FF);
    5494         idDelete(&FF);
     5492        G = idCopy(FF);
     5493        idDelete(&FF);
    54955494        goto NEXT_VECTOR;
    5496       } 
     5495      }
    54975496    }
    54985497
     
    55015500    {
    55025501      hilb_func = hFirstSeries(Gomega,NULL,NULL,curr_weight,currRing);
    5503     }   
     5502    }
    55045503    else
    55055504    {
     
    57875786      {
    57885787        idDelete(&G);
    5789         G = idCopy(FF);
    5790         idDelete(&FF);
     5788        G = idCopy(FF);
     5789        idDelete(&FF);
    57915790        goto NEXT_VECTOR;
    5792       } 
     5791      }
    57935792    }
    57945793#ifndef  BUCHBERGER_ALG
     
    57965795    {
    57975796      hilb_func = hFirstSeries(Gomega,NULL,NULL,curr_weight,currRing);
    5798     }   
     5797    }
    57995798    else
    58005799    {
     
    61686167      {
    61696168        idDelete(&G);
    6170         G = idCopy(FF);
    6171         idDelete(&FF);
     6169        G = idCopy(FF);
     6170        idDelete(&FF);
    61726171        goto NEXT_VECTOR;
    61736172      }
     
    66506649      {
    66516650        idDelete(&G);
    6652         G = idCopy(FF);
    6653         idDelete(&FF);
     6651        G = idCopy(FF);
     6652        idDelete(&FF);
    66546653        goto NEXT_VECTOR;
    6655       } 
     6654      }
    66566655    }
    66576656
     
    67026701        //idElements(Gomega1, "Gw");
    67036702        //headidString(Gomega1, "headGw");
    6704      
     6703
    67056704        PrintS("\n// compute a rGB of Gw:\n");
    67066705      }
     
    74057404      {
    74067405        idDelete(&G);
    7407         G = idCopy(FF);
    7408         idDelete(&FF);
    7409         // Compue next vector. 
     7406        G = idCopy(FF);
     7407        idDelete(&FF);
     7408        // Compue next vector.
    74107409        goto NEXT_VECTOR_FRACTAL;
    7411       } 
     7410      }
    74127411    }
    74137412
     
    78247823      }
    78257824      else
    7826       { 
     7825      {
    78277826        if(printout > 0)
    78287827        {
     
    79787977      {
    79797978        idDelete(&G);
    7980         G = idCopy(FF);
    7981         idDelete(&FF);
     7979        G = idCopy(FF);
     7980        idDelete(&FF);
    79827981        /* Compue next vector. */
    79837982        goto NEXT_VECTOR_FRACTAL;
    7984       } 
     7983      }
    79857984    }
    79867985
     
    86218620    next_weight = MwalkNextWeightCC(curr_weight,target_weight, G);
    86228621    tnw=tnw+clock()-to;
    8623 /*#ifdef PRINT_VECTORS
     8622#ifdef PRINT_VECTORS
    86248623    MivString(curr_weight, target_weight, next_weight);
    86258624#endif
    8626 */
    86278625
    86288626    /* check whether the computed intermediate weight vector is in
     
    98329830    next_weight = MkInterRedNextWeight(curr_weight,target_weight, G);
    98339831    xtnw=xtnw+clock()-to;
    9834 /*#ifdef PRINT_VECTORS
     9832#ifdef PRINT_VECTORS
    98359833    MivString(curr_weight, target_weight, next_weight);
    98369834#endif
    9837 */
    98389835    if(Overflow_Error == TRUE)
    98399836    {
Note: See TracChangeset for help on using the changeset viewer.