Changeset 633196 in git
- Timestamp:
- Jun 11, 2015, 4:10:16 PM (8 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- d52203afadb18a3c05d4c08a2bc18bc327690cd9
- Parents:
- 760258751f1fefe8bd1155f774a95487b0df36f420c1a357575a4f15b08754d8cab675b51b6d79b0
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/standard.lib
r20c1a3 r633196 804 804 "SYNTAX: @code{groebner (} ideal_expression @code{)} @* 805 805 @code{groebner (} module_expression @code{)} @* 806 @code{groebner (} ideal_expression@code{,} int_expression @code{)} @*807 @code{groebner (} module_expression@code{,} int_expression @code{)} @*808 806 @code{groebner (} ideal_expression@code{,} list of string_expressions 809 807 @code{)} @* 810 808 @code{groebner (} ideal_expression@code{,} list of string_expressions 811 and int_expression @code{)} @* 812 @code{groebner (} ideal_expression@code{,} int_expression @code{)} 809 and int_expression @code{)} 813 810 TYPE: type of the first argument 814 811 PURPOSE: computes a standard basis of the first argument @code{I} … … 829 826 afterwards back). 830 827 @code{option(prot)} informs about the chosen method. 831 NOTE: If an additional argument, say @code{wait}, of type int is given,832 then the computation runs for at most @code{wait} seconds.833 That is, if no result could be computed in @code{wait} seconds,834 then the computation is interrupted, 0 is returned, a warning835 message is displayed, and the global variable836 @code{Standard::groebner_error} is defined.837 This feature uses MP and hence it is available on UNIX platforms, only.838 828 HINT: Since there exists no uniform best method for computing standard 839 829 bases, and since the difference in performance of a method on … … 843 833 parameters/variables by integers, etc.). @* 844 834 SEE ALSO: stdhilb, stdfglm, std, slimgb 845 KEYWORDS: time limit on computations; MP,groebner basis computations835 KEYWORDS: groebner basis computations 846 836 EXAMPLE: example groebner; shows an example" 847 837 … … 904 894 for (k=1; k<=size(#); k++) 905 895 { 906 if (typeof(#[k]) == "int")907 {908 int wait = #[k];909 }910 896 if (typeof(#[k]) == "string") 911 897 { … … 914 900 } 915 901 } 916 917 //======= we have an argument of type int -- try to use MPfork links =======918 if ( defined(wait) == voice )919 {920 if ( system("with", "MP") )921 {922 int j = 10;923 string bs = nameof(basering);924 link l_fork = "MPtcp:fork";925 open(l_fork);926 write(l_fork, quote(system("pid")));927 int pid = read(l_fork);928 // write(l_fork, quote(groebner(eval(i))));929 write(l_fork, quote(groebner(eval(i),eval(Method))));930 //###Fehlermeldung:931 // ***dError: undef. ringorder used932 // occured at:933 934 // sleep in small intervalls for appr. one second935 if (wait > 0)936 {937 while(j < 1000000)938 {939 if (status(l_fork, "read", "ready", j)) {break;}940 j = j + j;941 }942 }943 944 // sleep in intervalls of one second from now on945 j = 1;946 while (j < wait)947 {948 if (status(l_fork, "read", "ready", 1000000)) {break;}949 j = j + 1;950 }951 952 if (status(l_fork, "read", "ready"))953 {954 def result = read(l_fork);955 if (bs != nameof(basering))956 {957 def PP = basering;958 setring P;959 def result = imap(PP, result);960 kill PP;961 }962 if (defined(groebner_error)==1)963 {964 kill groebner_error;965 }966 kill l_fork;967 }968 else969 {970 ideal result;971 if (! defined(groebner_error))972 {973 int groebner_error = 1;974 export groebner_error;975 }976 "** groebner did not finish";977 j = system("sh", "kill " + string(pid));978 }979 return (result);980 }981 else982 {983 "** groebner with a time limit on computation is not supported984 in this configuration";985 }986 }987 988 //=========== we are still here -- do the actual computation =============989 902 990 903 //--------------------- save data from basering --------------------------- … … 1065 978 if( find(method,"hilb") && !find(method,"fglm") ) 1066 979 { 1067 conversion = "hilb"; // $Id$980 conversion = "hilb"; 1068 981 } 1069 982 if( find(method,"fglm") && !find(method,"hilb") ) 1070 983 { 1071 conversion = "fglm"; // $Id$984 conversion = "fglm"; 1072 985 } 1073 986 if( find(method,"fglm") && find(method,"hilb") ) 1074 987 { 1075 conversion = "hilborfglm"; // $Id$988 conversion = "hilborfglm"; 1076 989 } 1077 990 if( !find(method,"fglm") && !find(method,"hilb") ) 1078 991 { 1079 conversion = "no"; // $Id$992 conversion = "no"; 1080 993 } 1081 994 … … 2532 2445 static proc mod_init() 2533 2446 { 2447 if(!defined(Singmathic)) 2448 { 2449 load("singmathic.so","try"); 2450 } 2534 2451 //int pagelength=24; 2535 2452 //exportto(Top,pagelength); -
Singular/dyn_modules/singmathic/Makefile.am
r20c1a3 r633196 20 20 singmathic_la_SOURCES = singmathic.cc 21 21 singmathic_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 22 singmathic_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 22 singmathic_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} ${MATHIC_LIBS} 23 23 24 24 # AM_COLOR_TESTS=always -
Singular/iparith.cc
r20c1a3 r633196 5341 5341 WerrorS_dummy_cnt=0; 5342 5342 BOOLEAN bo=jjLOAD(s,TRUE); 5343 if (bo || (WerrorS_dummy_cnt>0)) Print("loading of >%s< failed\n",s); 5343 if (TEST_OPT_PROT && (bo || (WerrorS_dummy_cnt>0))) 5344 Print("loading of >%s< failed\n",s); 5344 5345 WerrorS_callback=WerrorS_save; 5345 5346 errorreported=0; -
Singular/iplib.cc
r20c1a3 r633196 1092 1092 Werror("dynl_open failed:%s", dynl_error()); 1093 1093 Werror("%s not found", newlib); 1094 killhdl2(pl,&(basePack->idroot),NULL); // remove package 1094 1095 goto load_modules_end; 1095 1096 } … … 1119 1120 RET=FALSE; 1120 1121 } 1121 else Werror("mod_init not found:: %s\nThis is probably not a dynamic module for Singular!\n", dynl_error()); 1122 else 1123 { 1124 Werror("mod_init not found:: %s\nThis is probably not a dynamic module for Singular!\n", dynl_error()); 1125 killhdl2(pl,&(basePack->idroot),NULL); // remove package 1126 } 1122 1127 } 1123 1128 -
Singular/maps_ip.cc
r20c1a3 r633196 264 264 265 265 number d = n_GetDenom(p_GetCoeff(p, currRing), currRing); 266 p_Test((poly)NUM( d), R);266 p_Test((poly)NUM((fraction)d), R); 267 267 268 268 if ( n_IsOne (d, currRing->cf) ) … … 270 270 n_Delete(&d, currRing); d = NULL; 271 271 } 272 else if (!p_IsConstant((poly)NUM(d), R))272 else if (!p_IsConstant((poly)NUM((fraction)d), R)) 273 273 { 274 274 WarnS("ignoring denominators of coefficients..."); … … 279 279 memset(&tmpW,0,sizeof(sleftv)); 280 280 tmpW.rtyp = POLY_CMD; 281 p_Test((poly)NUM( num), R);282 283 tmpW.data = NUM ( num); // a copy of this poly will be used284 285 p_Normalize(NUM( num),R);281 p_Test((poly)NUM((fraction)num), R); 282 283 tmpW.data = NUM ((fraction)num); // a copy of this poly will be used 284 285 p_Normalize(NUM((fraction)num),R); 286 286 if (maApplyFetch(MAP_CMD,theMap,v,&tmpW,R,NULL,NULL,0,nMap)) 287 287 { -
Singular/walk.cc
r760258 r633196 806 806 for(i=nG-1; i>=0; i--) 807 807 { 808 mi = MpolyInitialForm(G->m[i], iv); 809 gi = G->m[i]; 810 808 mi = pHead(MpolyInitialForm(G->m[i], iv)); 809 //Print("\n **// test_w_in_ConeCC: lm(initial)= %s \n",pString(mi)); 810 gi = pHead(G->m[i]); 811 //Print("\n **// test_w_in_ConeCC: lm(ideal)= %s \n",pString(gi)); 811 812 if(mi == NULL) 812 813 { … … 1646 1647 (* result)[i] = mpz_get_si(pert_vector[i]); 1647 1648 } 1648 1649 /* 1649 1650 j = 0; 1650 for(i=0; i<n V; i++)1651 for(i=0; i<niv; i++) 1651 1652 { 1652 1653 (* result1)[i] = mpz_get_si(pert_vector[i]); … … 1658 1659 } 1659 1660 } 1660 if(j > n V- 1)1661 if(j > niv - 1) 1661 1662 { 1662 1663 // Print("\n// MfPertwalk: geaenderter vector gleich Null! \n"); … … 1664 1665 goto CHECK_OVERFLOW; 1665 1666 } 1666 1667 /* 1667 1668 // check that the perturbed weight vector lies in the Groebner cone 1669 Print("\n========================================\n//** MfPertvector: test in Cone.\n"); 1668 1670 if(test_w_in_ConeCC(G,result1) != 0) 1669 1671 { … … 1681 1683 // Print("\n// Mfpertwalk: geaenderter vector liegt nicht in Groebnerkegel! \n"); 1682 1684 } 1683 1685 Print("\n ========================================\n");*/ 1684 1686 CHECK_OVERFLOW: 1685 1687 … … 5043 5045 Set_Error(FALSE); 5044 5046 Overflow_Error = FALSE; 5045 BOOLEAN endwalks = FALSE;5047 //BOOLEAN endwalks = FALSE; 5046 5048 #ifdef TIME_TEST 5047 5049 clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0; … … 5057 5059 ring newRing; 5058 5060 ring XXRing = baseRing; 5061 ring targetRing; 5059 5062 intvec* ivNull = new intvec(nV); 5060 5063 intvec* curr_weight = new intvec(nV); … … 5065 5068 for(i=0; i<nV; i++) 5066 5069 { 5067 (*tmp_weight)[i] = (* target_M)[i];5070 (*tmp_weight)[i] = (*orig_M)[i]; 5068 5071 } 5069 5072 */ … … 5090 5093 } 5091 5094 //#endif 5095 5096 if(target_M->length() == nV) 5097 { 5098 // define the target ring 5099 targetRing = VMrDefault(target_weight); 5100 } 5101 else 5102 { 5103 targetRing = VMatrDefault(target_M); 5104 } 5105 if(orig_M->length() == nV) 5106 { 5107 // define a new ring with ordering "(a(curr_weight),lp) 5108 newRing = VMrDefault(curr_weight); 5109 } 5110 else 5111 { 5112 newRing = VMatrDefault(orig_M); 5113 } 5114 rChangeCurrRing(newRing); 5115 5092 5116 #ifdef TIME_TEST 5093 5117 to = clock(); 5094 5118 #endif 5095 if(orig_M->length() == nV) 5096 { 5097 // define a new ring with ordering "(a(curr_weight),lp) 5098 newRing = VMrDefault(curr_weight); 5099 } 5100 else 5101 { 5102 newRing = VMatrDefault(orig_M); 5103 } 5104 rChangeCurrRing(newRing); 5119 5105 5120 ideal G = MstdCC(idrMoveR(Go,baseRing,currRing)); 5106 //ideal G = idrMoveR(Go,baseRing,currRing); 5107 baseRing = currRing; 5121 5108 5122 #ifdef TIME_TEST 5109 5123 tostd = clock()-to; 5110 5124 #endif 5111 5125 5126 baseRing = currRing; 5112 5127 nwalk = 0; 5128 5113 5129 while(1) 5114 5130 { 5115 5131 nwalk ++; 5116 5132 nstep ++; 5133 5117 5134 #ifdef TIME_TEST 5118 5135 to = clock(); 5119 5136 #endif 5120 //#ifdef CHECK_IDEAL_MWALK5121 if(printout > 2)5122 {5123 idString(G,"//** Mwalk: G");5124 }5125 //#endif5126 // test whether target cone is reached5127 if(reduction !=0 && test_w_in_ConeCC(G,target_weight) == 1)5128 {5129 endwalks = TRUE;5130 }5131 5137 // compute an initial form ideal of <G> w.r.t. "curr_vector" 5132 5138 Gomega = MwalkInitialForm(G, curr_weight); 5133 5139 #ifdef TIME_TEST 5134 //time for computing initial form ideal5135 5140 tif = tif + clock()-to; 5136 5141 #endif 5142 5137 5143 //#ifdef CHECK_IDEAL_MWALK 5138 5144 if(printout > 1) … … 5141 5147 } 5142 5148 //#endif 5149 5143 5150 if(reduction == 0) 5144 5151 { 5145 //PrintS("\n//** Mwalk: test middle of cone!\n");5146 5152 FF = middleOfCone(G,Gomega); 5147 //PrintS("\n//** Mwalk: Test F!\n");5148 5153 if( FF != NULL) 5149 5154 { … … 5151 5156 G = idCopy(FF); 5152 5157 idDelete(&FF); 5153 //PrintS("\n//** Mwalk: FF nicht NULL! Compue next vector.\n");5154 5158 goto NEXT_VECTOR; 5155 5159 } 5156 5160 } 5161 5157 5162 #ifndef BUCHBERGER_ALG 5158 5163 if(isNolVector(curr_weight) == 0) … … 5165 5170 } 5166 5171 #endif 5172 5167 5173 if(nwalk == 1) 5168 5174 { … … 5181 5187 if(target_M->length() == nV) 5182 5188 { 5183 //define a new ring with ordering "(a(curr_weight), Wp(target_weight))"5184 newRing = VMr Refine(curr_weight,target_weight);5189 //define a new ring with ordering "(a(curr_weight),lp)" 5190 newRing = VMrDefault(curr_weight); 5185 5191 } 5186 5192 else … … 5225 5231 // where Gomega is a reduced Groebner basis w.r.t. the current ring 5226 5232 F = MLifttwoIdeal(Gomega2, M1, G); 5233 5227 5234 #ifdef TIME_TEST 5228 5235 tlift = tlift + clock() - to; … … 5236 5243 idDelete(&Gomega2); 5237 5244 idDelete(&M1); 5245 5238 5246 rChangeCurrRing(newRing); // change the ring to newRing 5239 5247 G = idrMoveR(F,baseRing,currRing); 5240 5248 idDelete(&F); 5249 idSkipZeroes(G); 5250 5251 //#ifdef CHECK_IDEAL_MWALK 5252 if(printout > 2) 5253 { 5254 idString(G, "//** Mwalk: G"); 5255 } 5256 //#endif 5257 5258 rChangeCurrRing(targetRing); 5259 G = idrMoveR(G,newRing,currRing); 5260 // test whether target cone is reached 5261 if(reduction !=0 && test_w_in_ConeCC(G,curr_weight) == 1) 5262 { 5263 baseRing = currRing; 5264 break; 5265 //endwalks = TRUE; 5266 } 5267 5268 rChangeCurrRing(newRing); 5269 G = idrMoveR(G,targetRing,currRing); 5241 5270 baseRing = currRing; 5271 5272 /* 5242 5273 #ifdef TIME_TEST 5243 5274 to = clock(); … … 5247 5278 tstd = tstd + clock() - to; 5248 5279 #endif 5249 idSkipZeroes(G); 5250 //#ifdef CHECK_IDEAL_MWALK 5251 if(printout > 2) 5252 { 5253 idString(G, "//** Mwalk: G"); 5254 } 5255 //#endif 5280 */ 5281 5282 5256 5283 #ifdef TIME_TEST 5257 5284 to = clock(); … … 5268 5295 } 5269 5296 //#endif 5270 if(MivComp(target_weight,curr_weight) == 1 || endwalks == TRUE) 5271 { 5272 5297 if(MivComp(target_weight,curr_weight) == 1)// || endwalks == TRUE) 5298 {/* 5273 5299 //#ifdef CHECK_IDEAL_MWALK 5274 5300 if(printout > 0) … … 5328 5354 to = clock(); 5329 5355 #endif 5330 / *PrintS("\n //**Mwalk: Interreduce");5356 //PrintS("\n //**Mwalk: Interreduce"); 5331 5357 //interreduce the Groebner basis <G> w.r.t. currRing 5332 G = kInterRedCC(G,NULL);*/5358 //G = kInterRedCC(G,NULL); 5333 5359 #ifdef TIME_TEST 5334 5360 tred = tred + clock() - to; 5335 5361 #endif 5336 5362 idSkipZeroes(G); 5337 delete next_weight; 5363 delete next_weight; */ 5338 5364 break; 5339 5365 } … … 5348 5374 rChangeCurrRing(XXRing); 5349 5375 ideal result = idrMoveR(G,baseRing,currRing); 5376 idDelete(&Go); 5350 5377 idDelete(&G); 5351 5378 //delete tmp_weight; … … 5376 5403 Set_Error(FALSE); 5377 5404 Overflow_Error = FALSE; 5378 BOOLEAN endwalks = FALSE;5405 //BOOLEAN endwalks = FALSE; 5379 5406 #ifdef TIME_TEST 5380 5407 clock_t tinput, tostd, tif=0, tstd=0, tlift=0, tred=0, tnw=0; … … 5389 5416 ideal Gomega, M, F,FF, Gomega1, Gomega2, M1; 5390 5417 ring newRing; 5418 ring targetRing; 5391 5419 ring baseRing = currRing; 5392 5420 ring XXRing = currRing; … … 5422 5450 to = clock(); 5423 5451 #endif 5452 5453 if(target_M->length() == nV) 5454 { 5455 // define the target ring 5456 targetRing = VMrDefault(target_weight); 5457 } 5458 else 5459 { 5460 targetRing = VMatrDefault(target_M); 5461 } 5424 5462 if(orig_M->length() == nV) 5425 5463 { … … 5445 5483 to = clock(); 5446 5484 #endif 5447 //#ifdef CHECK_IDEAL_MWALK 5448 if(printout > 2) 5449 { 5450 idString(G,"//** Mrwalk: G"); 5451 } 5452 //#endif 5485 5453 5486 Gomega = MwalkInitialForm(G, curr_weight); // compute an initial form ideal of <G> w.r.t. "curr_vector" 5454 5487 //polylength = 1 if there is a polynomial in Gomega with at least 3 monomials and 0 otherwise … … 5464 5497 //#endif 5465 5498 // test whether target cone is reached 5466 if(test_w_in_ConeCC(G,target_weight) == 1)5499 /* if(test_w_in_ConeCC(G,target_weight) == 1) 5467 5500 { 5468 5501 endwalks = TRUE; 5469 } 5502 }*/ 5470 5503 if(reduction == 0) 5471 5504 { 5472 //PrintS("\n//** Mrwalk: test middle of cone!\n");5505 5473 5506 FF = middleOfCone(G,Gomega); 5474 //PrintS("\n//** Mrwalk: Test F!\n");5507 5475 5508 if(FF != NULL) 5476 5509 { … … 5478 5511 G = idCopy(FF); 5479 5512 idDelete(&FF); 5480 //PrintS("\n//** Mrwalk: FF nicht NULL! Compue next vector.\n");5513 5481 5514 goto NEXT_VECTOR; 5482 5515 } … … 5507 5540 if(target_M->length() == nV) 5508 5541 { 5509 newRing = VMrRefine(curr_weight,target_weight); //define a new ring with ordering "(a(curr_weight),Wp(target_weight))" 5542 newRing = VMrDefault(curr_weight); // define a new ring with ordering "(a(curr_weight),lp) 5543 //newRing = VMrRefine(curr_weight,target_weight); //define a new ring with ordering "(a(curr_weight),Wp(target_weight))" 5510 5544 } 5511 5545 else … … 5575 5609 } 5576 5610 //#endif 5611 5612 rChangeCurrRing(targetRing); 5613 G = idrMoveR(G,newRing,currRing); 5614 // test whether target cone is reached 5615 if(reduction !=0 && test_w_in_ConeCC(G,curr_weight) == 1) 5616 { 5617 baseRing = currRing; 5618 break; 5619 } 5620 5621 rChangeCurrRing(newRing); 5622 G = idrMoveR(G,targetRing,currRing); 5623 baseRing = currRing; 5624 5625 5577 5626 NEXT_VECTOR: 5578 5627 #ifdef TIME_TEST … … 5596 5645 } 5597 5646 //#endif 5598 if(MivComp(next_weight, ivNull) == 1 || MivComp(target_weight,curr_weight) == 1 || endwalks == TRUE)5599 { 5647 if(MivComp(next_weight, ivNull) == 1 || MivComp(target_weight,curr_weight) == 1)// || endwalks == TRUE) 5648 {/* 5600 5649 //#ifdef CHECK_IDEAL_MWALK 5601 5650 if(printout > 0) … … 5655 5704 to = clock(); 5656 5705 #endif 5657 / *PrintS("\n //**Mrwalk: Interreduce");5706 //PrintS("\n //**Mrwalk: Interreduce"); 5658 5707 //interreduce the Groebner basis <G> w.r.t. currRing 5659 G = kInterRedCC(G,NULL);*/5708 //G = kInterRedCC(G,NULL); 5660 5709 #ifdef TIME_TEST 5661 5710 tred = tred + clock() - to; 5662 5711 #endif 5663 5712 idSkipZeroes(G); 5664 delete next_weight; 5713 delete next_weight;*/ 5665 5714 break; 5666 5715 } … … 6724 6773 { 6725 6774 Overflow_Error = FALSE; 6726 //Print("\n\n// Entering the %d-th recursion:", nlev); 6727 6775 if(printout >0) 6776 { 6777 Print("\n\n// Entering the %d-th recursion:", nlev); 6778 } 6728 6779 int i, nV = currRing->N; 6729 6780 ring new_ring, testring; … … 6793 6844 // We only perturb the current target vector at the recursion level 1 6794 6845 if(Xngleich == 0 && nlev == 1) //(ngleich == 0) important, e.g. ex2, ex3 6795 if (MivComp(next_vect, omega2) != 1)6846 if (MivComp(next_vect, omega2) == 1) 6796 6847 { 6797 6848 // to dispense with taking initial (and lifting/interreducing … … 6848 6899 to=clock(); 6849 6900 6850 / * to avoid the value of Overflow_Error that occur in Mfpertvector*/6901 // to avoid the value of Overflow_Error that occur in Mfpertvector 6851 6902 Overflow_Error = FALSE; 6852 6853 6903 next_vect = MkInterRedNextWeight(omega,omega2,G); 6854 6904 xtnw=xtnw+clock()-to; … … 6862 6912 //#endif 6863 6913 6864 /* check whether the the computed vector is in the correct cone */ 6865 /* If no, the reduced GB of an omega-homogeneous ideal will be 6866 computed by Buchberger algorithm and stop this recursion step*/ 6867 //if(test_w_in_ConeCC(G, next_vect) != 1) //e.g. Example s7, cyc6 6868 if(Overflow_Error == TRUE) 6914 // check whether the the computed vector is in the correct cone. 6915 // If no, compute the reduced Groebner basis of an omega-homogeneous 6916 // ideal with Buchberger's algorithm and stop this recursion step 6917 if(Overflow_Error == TRUE || test_w_in_ConeCC(G, next_vect) != 1) //e.g. Example s7, cyc6 6869 6918 { 6870 6919 delete next_vect; … … 6886 6935 if(printout > 0) 6887 6936 { 6888 Print("\n//** rec_fractal_call: Overflow.Applying Buchberger's algorithm in ring r = %s;",6937 Print("\n//** rec_fractal_call: Applying Buchberger's algorithm in ring r = %s;", 6889 6938 rString(currRing)); 6890 6939 } … … 6905 6954 6906 6955 nnflow ++; 6907 6908 6956 Overflow_Error = FALSE; 6909 6957 return (G1); 6910 } //end overflow-check6958 } 6911 6959 6912 6960 … … 6951 6999 if(printout > 0) 6952 7000 { 6953 Print("\n//** rec_fractal_call: Wrong cone. Tau 'doesn't stay in the correct cone.\n");7001 Print("\n//** rec_fractal_call: Wrong cone. Tau doesn't stay in the correct cone.\n"); 6954 7002 } 6955 /* 7003 6956 7004 #ifndef MSTDCC_FRACTAL 6957 7005 intvec* Xtautmp; … … 6990 7038 goto NEXT_VECTOR_FRACTAL; 6991 7039 #endif 6992 */ 7040 6993 7041 FRACTAL_MSTDCC: 6994 7042 if(printout > 0) … … 7063 7111 7064 7112 to=clock(); 7065 / * Take the initial form of <G> w.r.t. omega */7113 // Take the initial form of <G> w.r.t. omega 7066 7114 Gomega = MwalkInitialForm(G, omega); 7067 7115 xtif=xtif+clock()-to; … … 7073 7121 if(reduction == 0) 7074 7122 { 7075 / *Check whether the intermediate weight vector lies in the interior of the cone.7076 * If so, only perform reductions. Otherwise apply Buchberger's algorithm. */7123 // Check whether the intermediate weight vector lies in the interior of the cone. 7124 // If so, only perform reductions. Otherwise apply Buchberger's algorithm. 7077 7125 FF = middleOfCone(G,Gomega); 7078 7126 if( FF != NULL) … … 7081 7129 G = idCopy(FF); 7082 7130 idDelete(&FF); 7083 / * Compue next vector. */7131 // Compue next vector. 7084 7132 goto NEXT_VECTOR_FRACTAL; 7085 7133 } … … 7158 7206 G = idrMoveR(F,oRing,currRing); 7159 7207 to=clock(); 7160 / * Interreduce G */7161 // G = kInterRedCC(F1, NULL);7208 // Interreduce G 7209 // G = kInterRedCC(F1, NULL); 7162 7210 xtred=xtred+clock()-to; 7163 7211 //idDelete(&F1); … … 7239 7287 if(polylength > 0 && G->m[0] != NULL) 7240 7288 { 7241 /* 7242 there is a polynomial in Gomega with at least 3 monomials, 7243 low-dimensional facet of the cone 7244 */ 7289 7290 PrintS("\n**// rec_r_fractal_call: there is a polynomial in Gomega with at least 3 monomials, low-dimensional facet of the cone.\n"); 7291 7245 7292 delete next_vect; 7246 7293 next_vect = MWalkRandomNextWeight(G,omega,omega2,weight_rad,nlev); … … 7324 7371 if(G->m[0] != NULL && polylength > 0) 7325 7372 { 7326 /* 7327 there is a polynomial in Gomega with at least 3 monomials, 7328 low-dimensional facet of the cone 7329 */ 7373 7374 PrintS("//** rec_r_fractal_call: there is a polynomial in Gomega with at least 3 monomials, low-dimensional facet of the cone"); 7375 7330 7376 delete next_vect; 7331 7377 next_vect = MWalkRandomNextWeight(G,omega,omega2,weight_rad,nlev); … … 7349 7395 computed by Buchberger algorithm and stop this recursion step*/ 7350 7396 //if(test_w_in_ConeCC(G, next_vect) != 1) //e.g. Example s7, cyc6 7351 if(Overflow_Error == TRUE )7397 if(Overflow_Error == TRUE || test_w_in_ConeCC(G,next_vect) != 1) 7352 7398 { 7353 7399 delete next_vect; -
Tst/Manual/breakpoint.res.gz.uu
r20c1a3 r633196 1 1 begin 640 breakpoint.res.gz 2 M'XL(" (4YR5,``V)R96%K<&]I;G0N<F5S`'7000N"0!`%X+N_XB$=5C!),Q.$3 M/ 407(;K8/12'6)(UW(GZ^:U1IF"G7?;-^V"G..WS(X!0XI#OX++AH%&5F\'>4 MSDHK%E[ F]">D1-51>;VU2G.@Z1$8+MDI/D(TCL6E:ZG2U-GR[Q6ACY+1*$U(5 M XQ1*XSLW,.M9QD>X3:96]+-L-FO%?ZQE.*',N(R:&F*JQ>J9>(.TD>]]]!^^6 .&V'K"^<% ^NY1DCH!````2 M'XL("$+R=E4``V)R96%K<&]I;G0N<F5S`'7000N"0!`%X+N_XB$=5C!IM4P0 3 M/$07(;K8/12'6)(UW(GZ^:U1IF"G7?;-^V"G..WS(P"9X9#OX++AH%&5F\+> 4 MSDHK%E[J]">R#%5'Y?76*LV!ID=@N&2G^`CA.!:7KJ5*4V?+OU=('R6C49J0 5 M1`F4QG=N8*)9QH?<QE,K_%DVF[76?ZREG%!F7$9-#3'58O6,O4':9.]]]!^^ 6 .&V'K"^<%/$@GQSH!```` 7 7 ` 8 8 end -
libpolys/polys/clapconv.cc
r20c1a3 r633196 297 297 298 298 // test if denominator is constant 299 if (!p_IsConstantPoly(DEN ( p_GetCoeff (p,r)),r->cf->extRing) && !errorreported)299 if (!p_IsConstantPoly(DEN ((fraction)p_GetCoeff (p,r)),r->cf->extRing) && !errorreported) 300 300 WerrorS("conversion error: denominator!= 1"); 301 301 302 CanonicalForm term=convSingPFactoryP(NUM ( p_GetCoeff(p, r)),r->cf->extRing);302 CanonicalForm term=convSingPFactoryP(NUM ((fraction)p_GetCoeff(p, r)),r->cf->extRing); 303 303 304 304 // if denominator is not NULL it should be a constant at this point 305 if (DEN ( p_GetCoeff(p,r)) != NULL)306 { 307 CanonicalForm den= convSingPFactoryP(DEN ( p_GetCoeff(p, r)),r->cf->extRing);305 if (DEN ((fraction)p_GetCoeff(p,r)) != NULL) 306 { 307 CanonicalForm den= convSingPFactoryP(DEN ((fraction)p_GetCoeff(p, r)),r->cf->extRing); 308 308 if (rChar (r) == 0) 309 309 On (SW_RATIONAL); -
libpolys/polys/ext_fields/transext.cc
r20c1a3 r633196 1455 1455 //PrintS(" den=");p_wrp(DEN(a),ntRing);PrintLn(); 1456 1456 definiteGcdCancellation(a, cf, FALSE); 1457 if ((DEN(a)!=NULL) 1458 &&(!n_GreaterZero(pGetCoeff(DEN(a)),ntCoeffs))) 1459 { 1460 NUM(a)=p_Neg(NUM(a),ntRing); 1461 DEN(a)=p_Neg(DEN(a),ntRing); 1457 fraction f=(fraction)a; 1458 if ((DEN(f)!=NULL) 1459 &&(!n_GreaterZero(pGetCoeff(DEN(f)),ntCoeffs))) 1460 { 1461 NUM(f)=p_Neg(NUM(f),ntRing); 1462 DEN(f)=p_Neg(DEN(f),ntRing); 1463 a=(number)f; 1462 1464 } 1463 1465 } … … 2320 2322 } 2321 2323 2322 NUM( c) = p_Mult_nn(NUM(c), d, R);2324 NUM((fraction)c) = p_Mult_nn(NUM((fraction)c), d, R); 2323 2325 n_Delete(&d, Q); 2324 2326 } -
libpolys/polys/ext_fields/transext.h
r20c1a3 r633196 73 73 74 74 75 #define NUM(f) (( (fraction)f)->numerator)76 #define DEN(f) (( (fraction)f)->denominator)75 #define NUM(f) ((f)->numerator) 76 #define DEN(f) ((f)->denominator) 77 77 78 78 /* some useful accessors for fractions: */ -
libpolys/polys/monomials/p_polys.cc
r20c1a3 r633196 3841 3841 assume( !IS0(z) ); 3842 3842 3843 zz = NUM( z);3843 zz = NUM((fraction)z); 3844 3844 p_Test (zz, srcExtRing); 3845 3845 3846 3846 if( zz == NULL ) return NULL; 3847 if( !DENIS1( z) )3848 { 3849 if (p_IsConstant(DEN( z),srcExtRing))3850 { 3851 number n=pGetCoeff(DEN( z));3847 if( !DENIS1((fraction)z) ) 3848 { 3849 if (p_IsConstant(DEN((fraction)z),srcExtRing)) 3850 { 3851 number n=pGetCoeff(DEN((fraction)z)); 3852 3852 zz=p_Div_nn(zz,n,srcExtRing); 3853 3853 p_Normalize(zz,srcExtRing); … … 4011 4011 pcn = (poly) c; 4012 4012 else // nCoeff_is_transExt(C) 4013 pcn = NUM( c);4013 pcn = NUM((fraction)c); 4014 4014 4015 4015 if (pNext(pcn) == NULL) // c->z -
m4/mathic-check.m4
r20c1a3 r633196 14 14 dnl Checking these pre-requisites and adding them to libs is necessary 15 15 dnl for some reason, at least on Cygwin. 16 BACKUP_LIBS=${LIBS} 16 17 AS_IF( [test "x$with_mathicgb" = xyes], 17 18 [ … … 25 26 AC_CHECK_HEADER([mathicgb.h]) 26 27 AC_LANG_POP([C++]) 28 MATHIC_LIBS=${LIBS} 29 LIBS=${BACKUP_LIBS} 30 AC_SUBST(MATHIC_LIBS) 27 31 AC_DEFINE(HAVE_MATHICGB,1,[Define if mathicgb is to be used]) 28 32 # AC_SUBST(HAVE_MATHICGB_VALUE, 1) -
resources/omFindExec.c
r20c1a3 r633196 126 126 strcat (tbuf, name); 127 127 128 /* If we can execute the named file, then return it. */129 if (! access (tbuf, X_OK))128 /* If the named file exists, then return it. */ 129 if (! access (tbuf, F_OK)) 130 130 { 131 131 #ifdef WINNT
Note: See TracChangeset
for help on using the changeset viewer.