Changeset e94918 in git
- Timestamp:
- Aug 3, 2011, 5:40:29 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 3bef0a1d1e460c3e6aea207800d6677a02625ba9
- Parents:
- 8fa9eac11b7255f081ef96ac76bf845c0fc38c59
- git-author:
- Martin Lee <martinlee84@web.de>2011-08-03 17:40:29+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:14:17+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/walk.cc
r8fa9ea re94918 57 57 #include <polys/ext_fields/longalg.h> 58 58 #include <coeffs/ffields.h> 59 #include <coeffs/coeffs.h> 59 60 #include <Singular/subexpr.h> 60 61 #include <polys/templates/p_Procs.h> … … 290 291 strat->kHEdgeFound = ppNoether != NULL; 291 292 strat->kNoether=pCopy(ppNoether); 292 strat->ak = id RankFreeModule(F);293 strat->ak = id_RankFreeModule(F, currRing); 293 294 initBuchMoraCrit(strat); 294 strat->NotUsedAxis = (BOOLEAN *)omAlloc(( pVariables+1)*sizeof(BOOLEAN));295 for (j= pVariables; j>0; j--) strat->NotUsedAxis[j] = TRUE;295 strat->NotUsedAxis = (BOOLEAN *)omAlloc((currRing->N+1)*sizeof(BOOLEAN)); 296 for (j=currRing->N; j>0; j--) strat->NotUsedAxis[j] = TRUE; 296 297 strat->enterS = enterSBba; 297 298 strat->posInT = posInT0; … … 325 326 omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int)); 326 327 omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long)); 327 omFreeSize((ADDRESS)strat->NotUsedAxis,( pVariables+1)*sizeof(BOOLEAN));328 omFreeSize((ADDRESS)strat->NotUsedAxis,(currRing->N+1)*sizeof(BOOLEAN)); 328 329 omfree(strat->sevT); 329 330 omfree(strat->S_2_R); … … 564 565 mpz_init(zsum); 565 566 566 for (i= pVariables; i>0; i--)567 for (i=currRing->N; i>0; i--) 567 568 { 568 569 mpz_set_si(zvec, (*weight)[i-1]); … … 625 626 mpz_init(ztmp); 626 627 627 for (i= pVariables; i>0; i--)628 for (i=currRing->N; i>0; i--) 628 629 { 629 630 mpz_set_si(zvec, (*weight)[i-1]); … … 895 896 intvec* ivUnit = Mivdp(nV);//19.02 896 897 int i,j, tmpdeg, maxdeg=0; 897 number tmpcoeff , maxcoeff= nNULL;898 number tmpcoeff , maxcoeff=currRing->cf->nNULL; 898 899 poly p; 899 900 for(i=nG-1; i>=0; i--) … … 1817 1818 int i, nv = currRing->N; 1818 1819 1819 r->c h = currRing->ch;1820 r->cf->ch = rChar (currRing); 1820 1821 r->N = currRing->N; 1821 1822 int nb = rBlocks(currRing) + 1;//31.10.01 (+1) … … 1891 1892 int i, nv = currRing->N; 1892 1893 1893 r->c h = currRing->ch;1894 r->cf->ch = rChar (currRing); 1894 1895 r->N = currRing->N; 1895 1896 int nb = rBlocks(currRing) + 1;//31.10.01 (+1) … … 1950 1951 res->VarOffset = NULL; 1951 1952 res->ref=0; 1952 if (currRing-> extRing!=NULL)1953 currRing-> extRing->ref++;1954 1955 if ( currRing->parameter!=NULL)1956 { 1957 res-> minpoly=nCopy(currRing->minpoly);1953 if (currRing->cf->extRing!=NULL) 1954 currRing->cf->extRing->ref++; 1955 1956 if (rParameter (currRing)!=NULL) 1957 { 1958 res->cf->extRing->minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0],currRing->cf->extRing); 1958 1959 int l=rPar(currRing); 1959 res-> parameter=(char **)omAlloc(l*sizeof(char_ptr));1960 res->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr)); 1960 1961 1961 1962 for(i=l-1;i>=0;i--) 1962 r es->parameter[i]=omStrDup(currRing->parameter[i]);1963 rParameter (res)[i]=omStrDup(rParameter (currRing)[i]); 1963 1964 } 1964 1965 … … 2029 2030 r->VarOffset = NULL; 2030 2031 r->ref=0; 2031 if (currRing-> extRing!=NULL)2032 currRing-> extRing->ref++;2033 2034 if ( currRing->parameter!=NULL)2035 { 2036 r-> minpoly=nCopy(currRing->minpoly);2032 if (currRing->cf->extRing!=NULL) 2033 currRing->cf->extRing->ref++; 2034 2035 if (rParameter (currRing)!=NULL) 2036 { 2037 r->cf->extRing->minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0], currRing->cf->extRing); 2037 2038 int l=rPar(currRing); 2038 r-> parameter=(char **)omAlloc(l*sizeof(char_ptr));2039 r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr)); 2039 2040 2040 2041 for(i=l-1;i>=0;i--) 2041 r ->parameter[i]=omStrDup(currRing->parameter[i]);2042 } 2043 2044 2045 r->c h = currRing->ch;2042 rParameter(r)[i]=omStrDup(rParameter (currRing)[i]); 2043 } 2044 2045 2046 r->cf->ch = rChar (currRing); 2046 2047 r->N = currRing->N; 2047 2048 int nb = rBlocks(currRing) + 1;//31.10.01 (+1) … … 2080 2081 2081 2082 2082 if ( currRing->parameter!=NULL)2083 { 2084 r-> minpoly=nCopy(currRing->minpoly);2083 if (rParameter(currRing)!=NULL) 2084 { 2085 r->cf->extRing->minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0], currRing->cf->extRing); 2085 2086 int l=rPar(currRing); 2086 r-> parameter=(char **)omAlloc(l*sizeof(char_ptr));2087 r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr)); 2087 2088 2088 2089 for(i=l-1;i>=0;i--) 2089 r ->parameter[i]=omStrDup(currRing->parameter[i]);2090 rParameter(r)[i]=omStrDup(rParameter(currRing)[i]); 2090 2091 } 2091 2092 … … 2156 2157 { 2157 2158 //..25.03.03 VMrDefaultlp();// VMrDefault(target_weight); 2158 if ( currRing->parameter!= NULL)2159 if (rParameter (currRing) != NULL) 2159 2160 DefRingParlp(); 2160 2161 else … … 2162 2163 2163 2164 TargetRing = currRing; 2164 ssG = idrMoveR(G,EXXRing );2165 ssG = idrMoveR(G,EXXRing,currRing); 2165 2166 iv_M_lp = MivMatrixOrderlp(nV); 2166 2167 //target_weight = MPertVectorslp(ssG, iv_M_lp, tp_deg); … … 2170 2171 2171 2172 rChangeCurrRing(EXXRing); 2172 G = idrMoveR(ssG, TargetRing );2173 G = idrMoveR(ssG, TargetRing,currRing); 2173 2174 } 2174 2175 else … … 2242 2243 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 2243 2244 //..25.03.03 VMrDefault(curr_weight); 2244 if ( currRing->parameter!= NULL)2245 if (rParameter (currRing) != NULL) 2245 2246 DefRingPar(curr_weight); 2246 2247 else … … 2248 2249 2249 2250 newRing = currRing; 2250 Gomega1 = idrMoveR(Gomega, oldRing );2251 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 2251 2252 2252 2253 to=clock(); … … 2261 2262 /* change the ring to oldRing */ 2262 2263 rChangeCurrRing(oldRing); 2263 M1 = idrMoveR(M, newRing );2264 Gomega2 = idrMoveR(Gomega1, newRing );2264 M1 = idrMoveR(M, newRing,currRing); 2265 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 2265 2266 2266 2267 to=clock(); … … 2274 2275 /* change the ring to newRing */ 2275 2276 rChangeCurrRing(newRing); 2276 F1 = idrMoveR(F, oldRing );2277 F1 = idrMoveR(F, oldRing,currRing); 2277 2278 2278 2279 to=clock(); … … 2295 2296 { 2296 2297 //..25.03.03 VMrDefaultlp();//define and execute the ring "lp" 2297 if ( currRing->parameter!= NULL)2298 if (rParameter (currRing) != NULL) 2298 2299 DefRingParlp(); 2299 2300 else 2300 2301 VMrDefaultlp(); 2301 2302 2302 F1 = idrMoveR(G, newRing );2303 F1 = idrMoveR(G, newRing,currRing); 2303 2304 2304 2305 if(nnwinC == 0 || test_w_in_ConeCC(F1, pert_target_vector) != 1) … … 2306 2307 oldRing = currRing; 2307 2308 rChangeCurrRing(newRing); 2308 G = idrMoveR(F1, oldRing );2309 G = idrMoveR(F1, oldRing,currRing); 2309 2310 Print("\n// takes %d steps and calls the recursion of level %d:", 2310 2311 nwalk, tp_deg-1); … … 2315 2316 TargetRing = currRing; 2316 2317 rChangeCurrRing(EXXRing); 2317 result = idrMoveR(F1, TargetRing );2318 result = idrMoveR(F1, TargetRing,currRing); 2318 2319 } 2319 2320 else … … 2324 2325 /* 2325 2326 if(MivSame(curr_weight, iv_lp) == 1) 2326 if ( currRing->parameter!= NULL)2327 if (rParameter(currRing) != NULL) 2327 2328 DefRingParlp(); 2328 2329 else 2329 2330 VMrDefaultlp(); 2330 2331 else 2331 if ( currRing->parameter!= NULL)2332 if (rParameter(currRing) != NULL) 2332 2333 DefRingPar(curr_weight); 2333 2334 else … … 2336 2337 2337 2338 //..25.03.03 VMrDefaultlp();//define and execute the ring "lp" 2338 if ( currRing->parameter!= NULL)2339 if (rParameter (currRing) != NULL) 2339 2340 DefRingParlp(); 2340 2341 else … … 2342 2343 2343 2344 2344 F1 = idrMoveR(G, newRing );2345 F1 = idrMoveR(G, newRing,currRing); 2345 2346 //Print("\n// Apply \"std\" in ring r%d_%d = %s;\n", tp_deg, nwalk, rString(currRing)); 2346 2347 … … 2351 2352 2352 2353 rChangeCurrRing(EXXRing); 2353 result = idrMoveR(G, newRing );2354 result = idrMoveR(G, newRing,currRing); 2354 2355 } 2355 2356 delete target_weight; … … 2854 2855 ideal H0 = idHeadCC(G); 2855 2856 2856 if ( currRing->parameter!= NULL)2857 if (rParameter (currRing) != NULL) 2857 2858 DefRingParlp(); 2858 2859 else … … 2860 2861 2861 2862 TargetRing = currRing; 2862 ssG = idrMoveR(G,EXXRing );2863 2864 ideal H0_tmp = idrMoveR(H0,EXXRing );2863 ssG = idrMoveR(G,EXXRing,currRing); 2864 2865 ideal H0_tmp = idrMoveR(H0,EXXRing,currRing); 2865 2866 ideal H1 = idHeadCC(ssG); 2866 2867 … … 2890 2891 //PrintS("\n// Input is not GB!!"); 2891 2892 rChangeCurrRing(EXXRing); 2892 G = idrMoveR(ssG, TargetRing );2893 G = idrMoveR(ssG, TargetRing,currRing); 2893 2894 2894 2895 if(Overflow_Error == TRUE) { … … 2923 2924 2924 2925 /* defiNe a new ring that its ordering is "(a(curr_weight),lp) */ 2925 if ( currRing->parameter!= NULL)2926 if (rParameter(currRing) != NULL) 2926 2927 DefRingPar(curr_weight); 2927 2928 else … … 2929 2930 2930 2931 newRing = currRing; 2931 Gomega1 = idrMoveR(Gomega, oldRing );2932 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 2932 2933 to=clock(); 2933 2934 /* compute a reduced Groebner basis of <Gomega> w.r.t. "newRing" */ … … 2941 2942 /* change the ring to oldRing */ 2942 2943 rChangeCurrRing(oldRing); 2943 M1 = idrMoveR(M, newRing );2944 Gomega2 = idrMoveR(Gomega1, newRing );2944 M1 = idrMoveR(M, newRing,currRing); 2945 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 2945 2946 2946 2947 to=clock(); … … 2955 2956 /* change the ring to newRing */ 2956 2957 rChangeCurrRing(newRing); 2957 F1 = idrMoveR(F, oldRing );2958 F1 = idrMoveR(F, oldRing,currRing); 2958 2959 2959 2960 to=clock(); … … 3026 3027 newRing = currRing; 3027 3028 3028 if ( currRing->parameter!= NULL)3029 if (rParameter(currRing) != NULL) 3029 3030 DefRingParlp(); 3030 3031 else 3031 3032 VMrDefaultlp(); 3032 3033 3033 F1 = idrMoveR(G, newRing );3034 F1 = idrMoveR(G, newRing,currRing); 3034 3035 3035 3036 if(nnwinC == 0 || test_w_in_ConeCC(F1, target_weight) != 1 ) { … … 3043 3044 TargetRing = currRing; 3044 3045 rChangeCurrRing(EXXRing); 3045 result = idrMoveR(F1, TargetRing );3046 result = idrMoveR(F1, TargetRing,currRing); 3046 3047 } 3047 3048 else { … … 3050 3051 3051 3052 newRing = currRing; 3052 if ( currRing->parameter!= NULL)3053 if (rParameter(currRing) != NULL) 3053 3054 DefRingParlp(); 3054 3055 else … … 3057 3058 KSTD_Finish: 3058 3059 if(isGB == FALSE) 3059 F1 = idrMoveR(G, newRing );3060 F1 = idrMoveR(G, newRing,currRing); 3060 3061 else 3061 3062 F1 = G; … … 3073 3074 LastGB_Finish: 3074 3075 rChangeCurrRing(EXXRing); 3075 result = idrMoveR(G, newRing );3076 result = idrMoveR(G, newRing,currRing); 3076 3077 } 3077 3078 … … 3153 3154 3154 3155 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 3155 if ( currRing->parameter!= NULL)3156 if (rParameter(currRing) != NULL) 3156 3157 DefRingPar(curr_weight); 3157 3158 else … … 3159 3160 3160 3161 newRing = currRing; 3161 Gomega1 = idrMoveR(Gomega, oldRing );3162 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 3162 3163 to = clock(); 3163 3164 /* compute a reduced Groebner basis of <Gomega> w.r.t. "newRing" */ … … 3166 3167 /* change the ring to oldRing */ 3167 3168 rChangeCurrRing(oldRing); 3168 M1 = idrMoveR(M, newRing );3169 Gomega2 = idrMoveR(Gomega1, newRing );3169 M1 = idrMoveR(M, newRing,currRing); 3170 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 3170 3171 3171 3172 to = clock(); … … 3180 3181 /* change the ring to newRing */ 3181 3182 rChangeCurrRing(newRing); 3182 F1 = idrMoveR(F, oldRing );3183 F1 = idrMoveR(F, oldRing,currRing); 3183 3184 3184 3185 to = clock(); … … 3212 3213 3213 3214 newRing = currRing; 3214 if ( currRing->parameter!= NULL)3215 if (rParameter(currRing) != NULL) 3215 3216 DefRingPar(target_weight); 3216 3217 else 3217 3218 VMrDefault(target_weight); 3218 3219 3219 F1 = idrMoveR(G, newRing );3220 F1 = idrMoveR(G, newRing,currRing); 3220 3221 G = MstdCC(F1); 3221 3222 idDelete(&F1); … … 3257 3258 TEST_OVERFLOW_OI: 3258 3259 rChangeCurrRing(XXRing); 3259 G = idrMoveR(G, newRing );3260 G = idrMoveR(G, newRing,currRing); 3260 3261 delete ivNull; 3261 3262 delete exivlp; … … 3341 3342 { 3342 3343 ideal H0 = idHeadCC(G); 3343 if ( currRing->parameter!= NULL)3344 if (rParameter(currRing) != NULL) 3344 3345 DefRingPar(orig_target_weight); 3345 3346 else … … 3347 3348 3348 3349 TargetRing = currRing; 3349 ssG = idrMoveR(G,EXXRing );3350 3351 ideal H0_tmp = idrMoveR(H0,EXXRing );3350 ssG = idrMoveR(G,EXXRing,currRing); 3351 3352 ideal H0_tmp = idrMoveR(H0,EXXRing,currRing); 3352 3353 ideal H1 = idHeadCC(ssG); 3353 3354 id_Delete(&H0,EXXRing); … … 3384 3385 3385 3386 rChangeCurrRing(EXXRing); 3386 G = idrMoveR(ssG, TargetRing );3387 G = idrMoveR(ssG, TargetRing,currRing); 3387 3388 } 3388 3389 … … 3410 3411 3411 3412 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 3412 if ( currRing->parameter!= NULL)3413 if (rParameter(currRing) != NULL) 3413 3414 DefRingPar(curr_weight); 3414 3415 else … … 3416 3417 3417 3418 newRing = currRing; 3418 Gomega1 = idrMoveR(Gomega, oldRing );3419 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 3419 3420 3420 3421 to = clock(); … … 3431 3432 rChangeCurrRing(oldRing); 3432 3433 3433 M1 = idrMoveR(M, newRing );3434 Gomega2 = idrMoveR(Gomega1, newRing );3434 M1 = idrMoveR(M, newRing,currRing); 3435 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 3435 3436 3436 3437 to = clock(); … … 3445 3446 /* change the ring to newRing */ 3446 3447 rChangeCurrRing(newRing); 3447 F1 = idrMoveR(F, oldRing );3448 F1 = idrMoveR(F, oldRing,currRing); 3448 3449 3449 3450 to = clock(); … … 3512 3513 newRing = currRing; 3513 3514 3514 if ( currRing->parameter!= NULL)3515 if (rParameter(currRing) != NULL) 3515 3516 // DefRingParlp(); // 3516 3517 DefRingPar(orig_target_weight); … … 3519 3520 3520 3521 3521 F1 = idrMoveR(G, newRing );3522 F1 = idrMoveR(G, newRing,currRing); 3522 3523 3523 3524 if(nnwinC == 0) … … 3531 3532 TargetRing = currRing; 3532 3533 rChangeCurrRing(EXXRing); 3533 result = idrMoveR(F1, TargetRing );3534 result = idrMoveR(F1, TargetRing,currRing); 3534 3535 } 3535 3536 else … … 3537 3538 if(nlast == 1) 3538 3539 { 3539 if ( currRing->parameter!= NULL)3540 if (rParameter(currRing) != NULL) 3540 3541 DefRingPar(orig_target_weight); 3541 3542 else … … 3545 3546 KSTD_Finish: 3546 3547 if(isGB == FALSE) 3547 F1 = idrMoveR(G, newRing );3548 F1 = idrMoveR(G, newRing,currRing); 3548 3549 else 3549 3550 F1 = G; … … 3558 3559 LastGB_Finish: 3559 3560 rChangeCurrRing(EXXRing); 3560 result = idrMoveR(G, newRing );3561 result = idrMoveR(G, newRing,currRing); 3561 3562 } 3562 3563 … … 3659 3660 3660 3661 /* create a new ring newRing */ 3661 if ( currRing->parameter!= NULL)3662 if (rParameter(currRing) != NULL) 3662 3663 DefRingPar(curr_weight); 3663 3664 else … … 3665 3666 3666 3667 newRing = currRing; 3667 F1 = idrMoveR(F, oldRing );3668 F1 = idrMoveR(F, oldRing,currRing); 3668 3669 } 3669 3670 else … … 3678 3679 3679 3680 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 3680 if ( currRing->parameter!= NULL)3681 if (rParameter(currRing) != NULL) 3681 3682 DefRingPar(curr_weight); 3682 3683 else … … 3684 3685 3685 3686 newRing = currRing; 3686 Gomega1 = idrMoveR(Gomega, oldRing );3687 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 3687 3688 3688 3689 to = clock(); … … 3698 3699 /* change the ring to oldRing */ 3699 3700 rChangeCurrRing(oldRing); 3700 M1 = idrMoveR(M, newRing );3701 Gomega2 = idrMoveR(Gomega1, newRing );3701 M1 = idrMoveR(M, newRing,currRing); 3702 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 3702 3703 3703 3704 to = clock(); … … 3714 3715 /* change the ring to newRing */ 3715 3716 rChangeCurrRing(newRing); 3716 F1 = idrMoveR(F, oldRing );3717 F1 = idrMoveR(F, oldRing,currRing); 3717 3718 } 3718 3719 … … 3744 3745 PrintS("\n// ** The computed vector does NOT stay in Cone!!\n"); 3745 3746 3746 if ( currRing->parameter!= NULL)3747 if (rParameter(currRing) != NULL) 3747 3748 DefRingPar(target_weight); 3748 3749 else 3749 3750 VMrDefault(target_weight); 3750 3751 3751 F1 = idrMoveR(G, newRing );3752 F1 = idrMoveR(G, newRing,currRing); 3752 3753 G = MstdCC(F1); 3753 3754 idDelete(&F1); … … 3773 3774 } 3774 3775 rChangeCurrRing(XXRing); 3775 G = idrMoveR(G, newRing );3776 G = idrMoveR(G, newRing,currRing); 3776 3777 3777 3778 delete tmp_weight; … … 3841 3842 newRing = currRing; 3842 3843 3843 Gomega1 = idrMoveR(Gomega, oldRing );3844 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 3844 3845 3845 3846 /* compute a reduced Groebner basis of <Gomega> w.r.t. "newRing" */ … … 3855 3856 /* change the ring to oldRing */ 3856 3857 rChangeCurrRing(oldRing); 3857 M1 = idrMoveR(M, newRing );3858 Gomega2 = idrMoveR(Gomega1, newRing );3858 M1 = idrMoveR(M, newRing,currRing); 3859 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 3859 3860 3860 3861 /* compute a representation of the generators of submod (M) … … 3869 3870 /* change the ring to newRing */ 3870 3871 rChangeCurrRing(newRing); 3871 F1 = idrMoveR(F, oldRing );3872 F1 = idrMoveR(F, oldRing,currRing); 3872 3873 3873 3874 /* reduce the Groebner basis <G> w.r.t. new ring */ … … 3902 3903 } 3903 3904 rChangeCurrRing(XXRing); 3904 G = idrMoveR(G, newRing );3905 G = idrMoveR(G, newRing,currRing); 3905 3906 3906 3907 delete tmp_weight; … … 3981 3982 { 3982 3983 //ring order := (a(curr_weight),lp); 3983 if ( currRing->parameter!= NULL)3984 if (rParameter(currRing) != NULL) 3984 3985 DefRingPar(curr_weight); 3985 3986 else 3986 3987 VMrDefault(curr_weight); 3987 3988 3988 G = idrMoveR(Go, XXRing );3989 G = idrMoveR(Go, XXRing,currRing); 3989 3990 G = MstdCC(G); 3990 3991 tostd = clock()-to; … … 4002 4003 if(tp_deg > 1 && tp_deg <= nV) 4003 4004 { 4004 if ( currRing->parameter!= NULL)4005 if (rParameter(currRing) != NULL) 4005 4006 DefRingPar(target_weight); 4006 4007 else … … 4008 4009 4009 4010 TargetRing = currRing; 4010 ssG = idrMoveR(G,HelpRing );4011 ssG = idrMoveR(G,HelpRing,currRing); 4011 4012 if(MivSame(target_weight, exivlp) == 1) 4012 4013 { … … 4025 4026 pert_target_vector = target_weight; //vor 19. mai 2003//test 19 Junu 03 4026 4027 rChangeCurrRing(HelpRing); 4027 G = idrMoveR(ssG, TargetRing );4028 G = idrMoveR(ssG, TargetRing,currRing); 4028 4029 } 4029 4030 /* … … 4063 4064 4064 4065 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 4065 if ( currRing->parameter!= NULL)4066 if (rParameter(currRing) != NULL) 4066 4067 DefRingPar(curr_weight); 4067 4068 else … … 4069 4070 4070 4071 newRing = currRing; 4071 Gomega1 = idrMoveR(Gomega, oldRing );4072 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 4072 4073 4073 4074 #ifdef ENDWALKS … … 4107 4108 /* change the ring to oldRing */ 4108 4109 rChangeCurrRing(oldRing); 4109 M1 = idrMoveR(M, newRing );4110 Gomega2 = idrMoveR(Gomega1, newRing );4110 M1 = idrMoveR(M, newRing,currRing); 4111 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 4111 4112 4112 4113 //if(endwalks==1) PrintS("\n// Lifting is working:.."); … … 4128 4129 /* change the ring to newRing */ 4129 4130 rChangeCurrRing(newRing); 4130 F1 = idrMoveR(F, oldRing );4131 F1 = idrMoveR(F, oldRing,currRing); 4131 4132 4132 4133 //if(endwalks==1)PrintS("\n// InterRed is working now:"); … … 4181 4182 FINISH_160302://16.03.02 4182 4183 if(MivSame(orig_target, exivlp) == 1) 4183 if ( currRing->parameter!= NULL)4184 if (rParameter(currRing) != NULL) 4184 4185 DefRingParlp(); 4185 4186 else 4186 4187 VMrDefaultlp(); 4187 4188 else 4188 if ( currRing->parameter!= NULL)4189 if (rParameter(currRing) != NULL) 4189 4190 DefRingPar(orig_target); 4190 4191 else … … 4192 4193 4193 4194 TargetRing=currRing; 4194 F1 = idrMoveR(G, newRing );4195 F1 = idrMoveR(G, newRing,currRing); 4195 4196 #ifdef CHECK_IDEAL 4196 4197 headidString(G, "G"); … … 4224 4225 // PrintS("\n// ** calls \"LastGB\" to compute a GB"); 4225 4226 rChangeCurrRing(newRing); 4226 ideal F2 = idrMoveR(F1, TargetRing );4227 ideal F2 = idrMoveR(F1, TargetRing,currRing); 4227 4228 eF1 = LastGB(F2, curr_weight, tp_deg-1); 4228 4229 F2=NULL; … … 4232 4233 4233 4234 rChangeCurrRing(XXRing); 4234 Eresult = idrMoveR(eF1, exTargetRing );4235 Eresult = idrMoveR(eF1, exTargetRing,currRing); 4235 4236 } 4236 4237 else{ 4237 4238 rChangeCurrRing(XXRing); 4238 Eresult = idrMoveR(F1, TargetRing );4239 Eresult = idrMoveR(F1, TargetRing,currRing); 4239 4240 } 4240 4241 } 4241 4242 else { 4242 4243 rChangeCurrRing(XXRing); 4243 Eresult = idrMoveR(G, newRing );4244 Eresult = idrMoveR(G, newRing,currRing); 4244 4245 } 4245 4246 delete ivNull; … … 4360 4361 nlev +=1; 4361 4362 4362 if ( currRing->parameter!= NULL)4363 if (rParameter(currRing) != NULL) 4363 4364 DefRingPar(omtmp); 4364 4365 else … … 4366 4367 4367 4368 testring = currRing; 4368 Gt = idrMoveR(G, oRing );4369 Gt = idrMoveR(G, oRing,currRing); 4369 4370 4370 4371 /* perturb the original target vector w.r.t. the current GB */ … … 4373 4374 4374 4375 rChangeCurrRing(oRing); 4375 G = idrMoveR(Gt, testring );4376 G = idrMoveR(Gt, testring,currRing); 4376 4377 4377 4378 /* perturb the current vector w.r.t. the current GB */ … … 4409 4410 4410 4411 OVERFLOW_IN_NEXT_VECTOR: 4411 if ( currRing->parameter!= NULL)4412 if (rParameter(currRing) != NULL) 4412 4413 DefRingPar(omtmp); 4413 4414 else … … 4415 4416 4416 4417 #ifdef TEST_OVERFLOW 4417 Gt = idrMoveR(G, oRing );4418 Gt = idrMoveR(G, oRing,currRing); 4418 4419 Gt = NULL; return(Gt); 4419 4420 #endif … … 4421 4422 //Print("\n\n// apply BB's alg. in ring r = %s;", rString(currRing)); 4422 4423 to=clock(); 4423 Gt = idrMoveR(G, oRing );4424 Gt = idrMoveR(G, oRing,currRing); 4424 4425 G1 = MstdCC(Gt); 4425 4426 xtextra=xtextra+clock()-to; … … 4447 4448 if (MivComp(next_vect, XivNull) == 1) 4448 4449 { 4449 if ( currRing->parameter!= NULL)4450 if (rParameter(currRing) != NULL) 4450 4451 DefRingPar(omtmp); 4451 4452 else … … 4453 4454 4454 4455 testring = currRing; 4455 Gt = idrMoveR(G, oRing );4456 Gt = idrMoveR(G, oRing,currRing); 4456 4457 4457 4458 if(test_w_in_ConeCC(Gt, omega2) == 1) { … … 4494 4495 //Print("\n// ring tau = %s;", rString(currRing)); 4495 4496 rChangeCurrRing(oRing); 4496 G = idrMoveR(Gt, testring );4497 G = idrMoveR(Gt, testring,currRing); 4497 4498 4498 4499 goto NEXT_VECTOR_FRACTAL; … … 4509 4510 // update the original target vector w.r.t. the current GB 4510 4511 if(MivSame(Xivinput, Xivlp) == 1) 4511 if ( currRing->parameter!= NULL)4512 if (rParameter(currRing) != NULL) 4512 4513 DefRingParlp(); 4513 4514 else 4514 4515 VMrDefaultlp(); 4515 4516 else 4516 if ( currRing->parameter!= NULL)4517 if (rParameter(currRing) != NULL) 4517 4518 DefRingPar(Xivinput); 4518 4519 else … … 4520 4521 4521 4522 testring = currRing; 4522 Gt = idrMoveR(G, oRing );4523 Gt = idrMoveR(G, oRing,currRing); 4523 4524 4524 4525 delete Xtau; … … 4526 4527 4527 4528 rChangeCurrRing(oRing); 4528 G = idrMoveR(Gt, testring );4529 G = idrMoveR(Gt, testring,currRing); 4529 4530 4530 4531 delete omega2; … … 4561 4562 #endif // BUCHBERGER_ALG 4562 4563 4563 if ( currRing->parameter!= NULL)4564 if (rParameter(currRing) != NULL) 4564 4565 DefRingPar(omega); 4565 4566 else 4566 4567 VMrDefault(omega); 4567 4568 4568 Gomega1 = idrMoveR(Gomega, oRing );4569 Gomega1 = idrMoveR(Gomega, oRing,currRing); 4569 4570 4570 4571 /* Maximal recursion depth, to compute a red. GB */ … … 4593 4594 else { 4594 4595 rChangeCurrRing(oRing); 4595 Gomega1 = idrMoveR(Gomega1, oRing );4596 Gomega1 = idrMoveR(Gomega1, oRing,currRing); 4596 4597 Gresult = rec_fractal_call(idCopy(Gomega1),nlev+1,omega); 4597 4598 } … … 4601 4602 4602 4603 rChangeCurrRing(oRing); 4603 Gresult1 = idrMoveR(Gresult, new_ring );4604 Gomega2 = idrMoveR(Gomega1, new_ring );4604 Gresult1 = idrMoveR(Gresult, new_ring,currRing); 4605 Gomega2 = idrMoveR(Gomega1, new_ring,currRing); 4605 4606 4606 4607 to=clock(); … … 4613 4614 4614 4615 rChangeCurrRing(new_ring); 4615 F1 = idrMoveR(F, oRing );4616 F1 = idrMoveR(F, oRing,currRing); 4616 4617 4617 4618 to=clock(); … … 4682 4683 if(MivComp(ivtarget, Xivlp) != 1) 4683 4684 { 4684 if ( currRing->parameter!= NULL)4685 if (rParameter(currRing) != NULL) 4685 4686 DefRingPar(ivtarget); 4686 4687 else 4687 4688 VMrDefault(ivtarget); 4688 4689 4689 I1 = idrMoveR(I, oldRing );4690 I1 = idrMoveR(I, oldRing,currRing); 4690 4691 Mlp = MivWeightOrderlp(ivtarget); 4691 4692 Xtau = Mfpertvector(I1, Mlp); … … 4693 4694 else 4694 4695 { 4695 if ( currRing->parameter!= NULL)4696 if (rParameter(currRing) != NULL) 4696 4697 DefRingParlp(); 4697 4698 else 4698 4699 VMrDefaultlp(); 4699 4700 4700 I1 = idrMoveR(I, oldRing );4701 I1 = idrMoveR(I, oldRing,currRing); 4701 4702 Mlp = MivMatrixOrderlp(nV); 4702 4703 Xtau = Mfpertvector(I1, Mlp); … … 4711 4712 ring tRing = currRing; 4712 4713 4713 if ( currRing->parameter!= NULL)4714 if (rParameter(currRing) != NULL) 4714 4715 DefRingPar(ivstart); 4715 4716 else 4716 4717 VMrDefault(ivstart); 4717 4718 4718 I = idrMoveR(I1,tRing );4719 I = idrMoveR(I1,tRing,currRing); 4719 4720 to=clock(); 4720 4721 ideal J = MstdCC(I); … … 4728 4729 4729 4730 rChangeCurrRing(oldRing); 4730 resF = idrMoveR(J, helpRing );4731 resF = idrMoveR(J, helpRing,currRing); 4731 4732 idSkipZeroes(resF); 4732 4733 … … 4797 4798 { 4798 4799 //rOrdStr(currRing) = (a(.c_w..),lp,C) 4799 if ( currRing->parameter!= NULL)4800 if (rParameter(currRing) != NULL) 4800 4801 DefRingPar(curr_weight); 4801 4802 else 4802 4803 VMrDefault(curr_weight); 4803 G = idrMoveR(G, XXRing );4804 G = idrMoveR(G, XXRing,currRing); 4804 4805 G = MstdCC(G); 4805 4806 } … … 4823 4824 ring exring = currRing; 4824 4825 4825 if ( currRing->parameter!= NULL)4826 if (rParameter(currRing) != NULL) 4826 4827 DefRingPar(curr_weight); 4827 4828 else 4828 4829 VMrDefault(curr_weight); 4829 4830 to=clock(); 4830 Gw = idrMoveR(G, exring );4831 Gw = idrMoveR(G, exring,currRing); 4831 4832 G = MstdCC(Gw); 4832 4833 Gw = NULL; … … 4858 4859 4859 4860 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 4860 if ( currRing->parameter!= NULL)4861 if (rParameter(currRing) != NULL) 4861 4862 DefRingPar(curr_weight); 4862 4863 else … … 4864 4865 4865 4866 newRing = currRing; 4866 Gomega1 = idrMoveR(Gomega, oldRing );4867 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 4867 4868 4868 4869 to=clock(); … … 4878 4879 /* change the ring to oldRing */ 4879 4880 rChangeCurrRing(oldRing); 4880 M1 = idrMoveR(M, newRing );4881 Gomega2 = idrMoveR(Gomega1, newRing );4881 M1 = idrMoveR(M, newRing,currRing); 4882 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 4882 4883 4883 4884 to=clock(); … … 4894 4895 /* change the ring to newRing */ 4895 4896 rChangeCurrRing(newRing); 4896 F1 = idrMoveR(F, oldRing );4897 F1 = idrMoveR(F, oldRing,currRing); 4897 4898 4898 4899 to=clock(); … … 4938 4939 4939 4940 if(MivSame(target_tmp, iv_lp) == 1) 4940 if ( currRing->parameter!= NULL)4941 if (rParameter(currRing) != NULL) 4941 4942 DefRingParlp(); 4942 4943 else 4943 4944 VMrDefaultlp(); 4944 4945 else 4945 if ( currRing->parameter!= NULL)4946 if (rParameter(currRing) != NULL) 4946 4947 DefRingPar(target_tmp); 4947 4948 else … … 4949 4950 4950 4951 lpRing = currRing; 4951 G1 = idrMoveR(G, newRing );4952 G1 = idrMoveR(G, newRing,currRing); 4952 4953 4953 4954 to=clock(); … … 4959 4960 else { 4960 4961 rChangeCurrRing(newRing); 4961 G1 = idrMoveR(G1, lpRing );4962 G1 = idrMoveR(G1, lpRing,currRing); 4962 4963 4963 4964 //Print("\n\n// calls \"LastGB\" (%d) to compute a GB", nV-1); … … 4965 4966 4966 4967 rChangeCurrRing(lpRing); 4967 G = idrMoveR(G, newRing );4968 G = idrMoveR(G, newRing,currRing); 4968 4969 } 4969 4970 textra=clock()-to; … … 4992 4993 if(endwalks == 1 && MivComp(next_weight, curr_weight) == 1){ 4993 4994 rChangeCurrRing(XXRing); 4994 G = idrMoveR(G, newRing );4995 G = idrMoveR(G, newRing,currRing); 4995 4996 goto FINISH; 4996 4997 } … … 4998 4999 4999 5000 if(MivSame(target_tmp, iv_lp) == 1) 5000 if ( currRing->parameter!= NULL)5001 if (rParameter(currRing) != NULL) 5001 5002 DefRingParlp(); 5002 5003 else 5003 5004 VMrDefaultlp(); 5004 5005 else 5005 if ( currRing->parameter!= NULL)5006 if (rParameter(currRing) != NULL) 5006 5007 DefRingPar(target_tmp); 5007 5008 else … … 5009 5010 5010 5011 lpRing = currRing; 5011 Glp = idrMoveR(G, newRing );5012 H2 = idrMoveR(H0, newRing );5012 Glp = idrMoveR(G, newRing,currRing); 5013 H2 = idrMoveR(H0, newRing,currRing); 5013 5014 5014 5015 /* Apply Lemma 2.2 in Collart et. al (1997) to check whether … … 5067 5068 { 5068 5069 rChangeCurrRing(newRing); 5069 G = idrMoveR(Glp, lpRing );5070 G = idrMoveR(Glp, lpRing,currRing); 5070 5071 goto OMEGA_OVERFLOW_TRAN_NEW; 5071 5072 } … … 5081 5082 { 5082 5083 rChangeCurrRing(newRing); 5083 G = idrMoveR(Glp, lpRing );5084 G = idrMoveR(Glp, lpRing,currRing); 5084 5085 goto TRAN_LIFTING; 5085 5086 } … … 5099 5100 */ 5100 5101 rChangeCurrRing(newRing); 5101 G = idrMoveR(Glp, lpRing );5102 G = idrMoveR(Glp, lpRing,currRing); 5102 5103 5103 5104 delete next_weight; … … 5116 5117 BE_FINISH: 5117 5118 rChangeCurrRing(XXRing); 5118 G = idrMoveR(G, lpRing );5119 G = idrMoveR(G, lpRing,currRing); 5119 5120 5120 5121 FINISH: … … 5165 5166 if(Overflow_Error == FALSE) 5166 5167 { 5167 if ( currRing->parameter!= NULL)5168 if (rParameter(currRing) != NULL) 5168 5169 DefRingParlp(); 5169 5170 else … … 5171 5172 5172 5173 TargetRing = currRing; 5173 ssG = idrMoveR(Go,YXXRing );5174 ssG = idrMoveR(Go,YXXRing,currRing); 5174 5175 } 5175 5176 Overflow_Error = FALSE; … … 5206 5207 5207 5208 rChangeCurrRing(YXXRing); 5208 G = idrMoveR(ssG, TargetRing );5209 G = idrMoveR(ssG, TargetRing,currRing); 5209 5210 5210 5211 while(1) … … 5239 5240 5240 5241 /* define a new ring that its ordering is "(a(curr_weight),lp) */ 5241 if ( currRing->parameter!= NULL)5242 if (rParameter(currRing) != NULL) 5242 5243 DefRingPar(curr_weight); 5243 5244 else … … 5245 5246 5246 5247 newRing = currRing; 5247 Gomega1 = idrMoveR(Gomega, oldRing );5248 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 5248 5249 5249 5250 #ifdef ENDWALKS … … 5268 5269 /* change the ring to oldRing */ 5269 5270 rChangeCurrRing(oldRing); 5270 M1 = idrMoveR(M, newRing );5271 Gomega2 = idrMoveR(Gomega1, newRing );5271 M1 = idrMoveR(M, newRing,currRing); 5272 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 5272 5273 to=clock(); 5273 5274 … … 5285 5286 /* change the ring to newRing */ 5286 5287 rChangeCurrRing(newRing); 5287 F1 = idrMoveR(F, oldRing );5288 F1 = idrMoveR(F, oldRing,currRing); 5288 5289 to=clock(); 5289 5290 //if(endwalks == 1) PrintS("\n// InterRed is still working:"); … … 5348 5349 5349 5350 //define and execute ring with lex. order 5350 if ( currRing->parameter!= NULL)5351 if (rParameter(currRing) != NULL) 5351 5352 DefRingParlp(); 5352 5353 else 5353 5354 VMrDefaultlp(); 5354 5355 5355 G1 = idrMoveR(G, newRing );5356 G1 = idrMoveR(G, newRing,currRing); 5356 5357 5357 5358 if( test_w_in_ConeCC(G1, target_weight) != 1 || ntestwinC == 0) … … 5381 5382 newRing = currRing; 5382 5383 rChangeCurrRing(YXXRing); 5383 ideal result = idrMoveR(G1, newRing );5384 ideal result = idrMoveR(G1, newRing,currRing); 5384 5385 5385 5386 delete ivNull; … … 5450 5451 if(op_tmp == op_deg) { 5451 5452 //rOrdStr(currRing) = (a(...),lp,C) 5452 if ( currRing->parameter!= NULL)5453 if (rParameter(currRing) != NULL) 5453 5454 DefRingPar(cw_tmp); 5454 5455 else 5455 5456 VMrDefault(cw_tmp); 5456 5457 5457 G = idrMoveR(Go, XXRing );5458 G = idrMoveR(Go, XXRing,currRing); 5458 5459 G = MstdCC(G); 5459 5460 if(op_deg != 1) … … 5513 5514 5514 5515 /* define a new ring which ordering is "(a(curr_weight),lp) */ 5515 if ( currRing->parameter!= NULL)5516 if (rParameter(currRing) != NULL) 5516 5517 DefRingPar(curr_weight); 5517 5518 else … … 5519 5520 5520 5521 newRing = currRing; 5521 Gomega1 = idrMoveR(Gomega, oldRing );5522 Gomega1 = idrMoveR(Gomega, oldRing,currRing); 5522 5523 5523 5524 to=clock(); … … 5533 5534 /* change the ring to oldRing */ 5534 5535 rChangeCurrRing(oldRing); 5535 M1 = idrMoveR(M, newRing );5536 Gomega2 = idrMoveR(Gomega1, newRing );5536 M1 = idrMoveR(M, newRing,currRing); 5537 Gomega2 = idrMoveR(Gomega1, newRing,currRing); 5537 5538 5538 5539 to=clock(); … … 5548 5549 /* change the ring to newRing */ 5549 5550 rChangeCurrRing(newRing); 5550 F1 = idrMoveR(F, oldRing );5551 F1 = idrMoveR(F, oldRing,currRing); 5551 5552 5552 5553 to=clock(); … … 5572 5573 newRing = currRing; 5573 5574 5574 if ( currRing->parameter!= NULL)5575 if (rParameter(currRing) != NULL) 5575 5576 DefRingPar(target_weight); 5576 5577 else 5577 5578 VMrDefault(target_weight); 5578 5579 5579 F1 = idrMoveR(G, newRing );5580 F1 = idrMoveR(G, newRing,currRing); 5580 5581 G = MstdCC(F1); 5581 5582 idDelete(&F1); … … 5624 5625 5625 5626 rChangeCurrRing(XXRing); 5626 ideal result = idrMoveR(G, newRing );5627 ideal result = idrMoveR(G, newRing,currRing); 5627 5628 id_Delete(&G, newRing); 5628 5629
Note: See TracChangeset
for help on using the changeset viewer.