Changeset 7d16bfd in git for Singular/walk.cc
- Timestamp:
- Nov 25, 2015, 5:53:28 PM (8 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 3de8ef2ecb36a7d12cbf01da2fe987428f685594
- Parents:
- cf860bd81a97eb9d7215bc8cc0fbae130cee792e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/walk.cc
rcf860b r7d16bfd 20 20 21 21 //#define NEXT_VECTORS_CC 22 #define PRINT_VECTORS //to print weight vectors22 //#define PRINT_VECTORS //to print weight vectors 23 23 24 24 #define INVEPS_SMALL_IN_FRACTAL //to choose the small invers of epsilon … … 990 990 assume((iv->length())*(iv->length()) == iw->length()); 991 991 int i,j, nR = iv->length(); 992 992 993 993 intvec* ivm = new intvec(nR*nR); 994 994 … … 2151 2151 { 2152 2152 (*diff_weight)[j] = (*diff_weight1)[j]; 2153 mpz_set_si(vec[j], (*diff_weight)[j]); 2153 mpz_set_si(vec[j], (*diff_weight)[j]); 2154 2154 } 2155 2155 for(j=0; j<nRing; j++) … … 2297 2297 for(j=0; j<nRing; j++) 2298 2298 { 2299 (*curr_weight)[j] = (*diff_weight1)[j]; 2299 (*curr_weight)[j] = (*diff_weight1)[j]; 2300 2300 } 2301 2301 for(j=0; j<nRing; j++) … … 2831 2831 2832 2832 // complete ring intializations 2833 2833 2834 2834 rComplete(r); 2835 2835 … … 3256 3256 3257 3257 ideal Go = idCopy(G); 3258 3258 3259 3259 // check whether leading monomials of G and Gomega coincide 3260 3260 // and return NULL if not … … 3264 3264 { 3265 3265 idDelete(&Go); 3266 return NULL; 3266 return NULL; 3267 3267 } 3268 3268 } … … 3274 3274 { 3275 3275 p = pCopy(Gomega->m[i]); 3276 3276 lm = pCopy(Gomega->m[j]); 3277 3277 pIter(p); 3278 3278 while(p!=NULL) … … 3283 3283 { 3284 3284 middle = TRUE; 3285 3285 } 3286 3286 factor1 = singclap_pdivide(pHead(p),lm,currRing); 3287 3287 factor2 = pMult(pCopy(factor1),pCopy(Go->m[j])); … … 3303 3303 } 3304 3304 idDelete(&Go); 3305 return NULL; 3305 return NULL; 3306 3306 } 3307 3307 … … 4254 4254 next_weight = MkInterRedNextWeight(curr_weight,target_weight, G); 4255 4255 xtnw=xtnw+clock()-to; 4256 /*#ifdef PRINT_VECTORS4256 #ifdef PRINT_VECTORS 4257 4257 MivString(curr_weight, target_weight, next_weight); 4258 4258 #endif 4259 */4260 4259 if(Overflow_Error == TRUE) 4261 4260 { … … 4292 4291 //nOverflow_Error = Overflow_Error; 4293 4292 tproc=tproc+clock()-tinput; 4294 4293 4295 4294 /*Print("\n// takes %d steps and calls \"Rec_LastGB\" (%d):", 4296 4295 nwalk, tp_deg+1); … … 4703 4702 } 4704 4703 } 4705 4704 4706 4705 // compute "perturbed" next weight vector 4707 4706 if(pert_deg > 1) … … 4716 4715 } 4717 4716 if(MivSame(curr_weight,next_weight)==1 || Overflow_Error == TRUE) 4718 { 4717 { 4719 4718 Overflow_Error = FALSE; 4720 4719 delete next_weight; … … 4745 4744 (*result)[i] = (*next_weight1)[i]; 4746 4745 } 4747 } 4746 } 4748 4747 } 4749 4748 else … … 4822 4821 } 4823 4822 if(test_w_in_ConeCC(G, result) == 1 && MivSame(curr_weight,result)==0) 4824 { 4823 { 4825 4824 delete curr_weight; 4826 4825 delete next_weight1; … … 5491 5490 PrintS("middle of Cone"); 5492 5491 idDelete(&G); 5493 5494 5492 G = idCopy(FF); 5493 idDelete(&FF); 5495 5494 goto NEXT_VECTOR; 5496 } 5495 } 5497 5496 } 5498 5497 … … 5501 5500 { 5502 5501 hilb_func = hFirstSeries(Gomega,NULL,NULL,curr_weight,currRing); 5503 } 5502 } 5504 5503 else 5505 5504 { … … 5787 5786 { 5788 5787 idDelete(&G); 5789 5790 5788 G = idCopy(FF); 5789 idDelete(&FF); 5791 5790 goto NEXT_VECTOR; 5792 } 5791 } 5793 5792 } 5794 5793 #ifndef BUCHBERGER_ALG … … 5796 5795 { 5797 5796 hilb_func = hFirstSeries(Gomega,NULL,NULL,curr_weight,currRing); 5798 } 5797 } 5799 5798 else 5800 5799 { … … 6168 6167 { 6169 6168 idDelete(&G); 6170 6171 idDelete(&FF); 6169 G = idCopy(FF); 6170 idDelete(&FF); 6172 6171 goto NEXT_VECTOR; 6173 6172 } … … 6650 6649 { 6651 6650 idDelete(&G); 6652 6653 idDelete(&FF); 6651 G = idCopy(FF); 6652 idDelete(&FF); 6654 6653 goto NEXT_VECTOR; 6655 } 6654 } 6656 6655 } 6657 6656 … … 6702 6701 //idElements(Gomega1, "Gw"); 6703 6702 //headidString(Gomega1, "headGw"); 6704 6703 6705 6704 PrintS("\n// compute a rGB of Gw:\n"); 6706 6705 } … … 7405 7404 { 7406 7405 idDelete(&G); 7407 7408 7409 // Compue next vector. 7406 G = idCopy(FF); 7407 idDelete(&FF); 7408 // Compue next vector. 7410 7409 goto NEXT_VECTOR_FRACTAL; 7411 } 7410 } 7412 7411 } 7413 7412 … … 7824 7823 } 7825 7824 else 7826 { 7825 { 7827 7826 if(printout > 0) 7828 7827 { … … 7978 7977 { 7979 7978 idDelete(&G); 7980 7981 7979 G = idCopy(FF); 7980 idDelete(&FF); 7982 7981 /* Compue next vector. */ 7983 7982 goto NEXT_VECTOR_FRACTAL; 7984 } 7983 } 7985 7984 } 7986 7985 … … 8621 8620 next_weight = MwalkNextWeightCC(curr_weight,target_weight, G); 8622 8621 tnw=tnw+clock()-to; 8623 /*#ifdef PRINT_VECTORS8622 #ifdef PRINT_VECTORS 8624 8623 MivString(curr_weight, target_weight, next_weight); 8625 8624 #endif 8626 */8627 8625 8628 8626 /* check whether the computed intermediate weight vector is in … … 9832 9830 next_weight = MkInterRedNextWeight(curr_weight,target_weight, G); 9833 9831 xtnw=xtnw+clock()-to; 9834 /*#ifdef PRINT_VECTORS9832 #ifdef PRINT_VECTORS 9835 9833 MivString(curr_weight, target_weight, next_weight); 9836 9834 #endif 9837 */9838 9835 if(Overflow_Error == TRUE) 9839 9836 {
Note: See TracChangeset
for help on using the changeset viewer.