Changeset c25bc58 in git
- Timestamp:
- Aug 9, 2016, 3:24:34 PM (8 years ago)
- Branches:
- (u'spielwiese', '52dcfddee5ec87d404d5e0fb44f2d627608208f1')
- Children:
- 9a0f21549aaff59eeb1077af356c1ec510c059e4
- Parents:
- 7436e955ac75fa53219a330142e7392eaaf7ad72
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/tropical.lib
r7436e9 rc25bc58 53 53 Note, that this in particular forbids rational exponents for the t's. 54 54 55 Moreover, in Singularno negative exponents of monomials are allowed, so55 Moreover, in @sc{Singular} no negative exponents of monomials are allowed, so 56 56 that the integer vectors vi will have to have non-negative entries. 57 57 Shifting all exponents by a fixed integer vector does not change the … … 292 292 computer; if you have GFAN version less than 0.3.0 then you must 293 293 use the optional parameter 'oldGfan' 294 @* - the procedure requires the Singularprocedure absPrimdecGTZ to be294 @* - the procedure requires the @sc{Singular} procedure absPrimdecGTZ to be 295 295 present in the package primdec.lib, unless the option 'noAbs' is set; 296 296 but even if absPrimdecGTZ is present it might be necessary to set … … 311 311 and you are unlucky 312 312 @* + the option 'noAbs' has to be used since absolute primary 313 decomposition in Singularonly works in characteristic zero313 decomposition in @sc{Singular} only works in characteristic zero 314 314 @* - the basefield should either be Q or Z/pZ for some prime p; 315 315 field extensions will be computed if necessary; if you need … … 597 597 // note: it may happen, that when resubstituting PARA into 598 598 // the replacement rules 599 // there occur red some unexpected cancellation;599 // there occured some unexpected cancellation; 600 600 // we only know that for SOME 601 601 // solution of the zero-dimensional reduction NO … … 991 991 REMARK: - it is best to use the procedure displayPuiseuxExpansion to 992 992 display the result 993 @* - the procedure requires the Singularprocedure absPrimdecGTZ to be993 @* - the procedure requires the @sc{Singular} procedure absPrimdecGTZ to be 994 994 present in the package primdec.lib 995 995 @* - if f is not squarefree it will be replaced by its squarefree part … … 2491 2491 computed linear forms, the former that we consider their minimum 2492 2492 EXAMPLE: example tropicalise; shows an example" 2493 { 2493 { 2494 if (npars(basering)==0) 2495 { 2496 ERROR("The basering has no paramter t."); 2497 } 2494 2498 int order,j; 2495 2499 list tropicalf; … … 4109 4113 // --- first we try small numbers 4110 4114 } 4111 if ((j3==2) and ((char(basering)==0) or (char(basering)>100)))4112 {4113 randomp1=random(1,100);4114 randomp=t^(A[1,j2])*randomp1;// make a random constant4115 // --- next we try bigger numbers4116 }4117 4115 else 4118 4116 { 4119 randomp1=random(1,char(basering)-1); 4120 randomp=t^(A[1,j2])*randomp1;//make a random constant 4117 if ((j3==2) and ((char(basering)==0) or (char(basering)>100))) 4118 { 4119 randomp1=random(1,100); 4120 randomp=t^(A[1,j2])*randomp1;// make a random constant 4121 // --- next we try bigger numbers 4122 } 4123 else 4124 { 4125 randomp1=random(1,char(basering)-1); 4126 randomp=t^(A[1,j2])*randomp1;//make a random constant 4127 } 4121 4128 } 4122 4129 ergl[A[2,j2]]=randomp;//and save the constant in a list … … 4709 4716 // which in a later version 4710 4717 // should be interpreded by Singular 4711 intvec wneu=choosegfanvector(read("/tmp/gfanoutput"),0 )[1];4718 intvec wneu=choosegfanvector(read("/tmp/gfanoutput"),0,anzahlvariablen)[1]; 4712 4719 setring PREGFANRING; 4713 4720 } … … 5432 5439 ///////////////////////////////////////////////////////////////////////// 5433 5440 5434 static proc choosegfanvector (string s,int findall )5441 static proc choosegfanvector (string s,int findall,int anzahlvariablen) 5435 5442 "USAGE: choosegfanvector(s); s string 5436 5443 RETURN: list, the jth entry is the jth integer vector contained in s … … 5447 5454 } 5448 5455 execute("intvec ww="+w+";"); 5449 ww=ww[1..size(ww)-1]; 5456 // the last entry in ww should correspond to the homogenisation variable 5457 // (and can be omitted), unless the input to gfan was already homogeneous 5458 if (anzahlvariablen==size(ww)-1) 5459 { 5460 ww=ww[1..size(ww)-1]; 5461 } 5450 5462 return(list(ww)); 5451 5463 } … … 5474 5486 { 5475 5487 execute("www=intvec("+w+");"); 5476 ww[i]=intvec(www[1..size(www)-1]); 5488 if (anzahlvariablen==size(ww)-1) 5489 { 5490 ww[i]=intvec(www[1..size(www)-1]); 5491 } 5492 else 5493 { 5494 ww[i]=www; 5495 } 5477 5496 w=""; 5478 5497 i++; … … 5597 5616 int recursively; // is set 1 if the procedure is called recursively by itself 5598 5617 int ii,jj,kk,ll,jjj,kkk,lll; 5599 if (typeof(#[1])=="int") // this means the pr ecedure has been5618 if (typeof(#[1])=="int") // this means the procedure has been 5600 5619 { // called recursively 5601 5620 // how many variables are true variables, and how many come … … 5755 5774 // which in a later version 5756 5775 // should be interpreded by Singular 5757 wneulist=choosegfanvector(read("/tmp/gfanoutput"),findall );5776 wneulist=choosegfanvector(read("/tmp/gfanoutput"),findall,anzahlvariablen); 5758 5777 setring PREGFANRING; 5759 5778 }
Note: See TracChangeset
for help on using the changeset viewer.