Changeset 9e8ae12 in git
 Timestamp:
 Dec 11, 2013, 5:45:11 PM (11 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
 Children:
 e57255411cecb6f684d1e9f8dbe4f0cc670307a9
 Parents:
 8275a9c69d35539035837ac649f76ebc01f927c0
 gitauthor:
 Yue Ren <ren@mathematik.unikl.de>20131211 17:45:11+01:00
 gitcommitter:
 Yue Ren <ren@mathematik.unikl.de>20131211 17:46:46+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/tropical.lib
r8275a9 r9e8ae12 1 // /////////////////////////////////////////////////////////2 version=" version tropical.lib 4.0.0.0 Jun_2013 "; // $Id$1 // 2 version="$Id$"; 3 3 category="Tropical Geometry"; 4 4 info=" … … 204 204 LIB "elim.lib"; 205 205 LIB "linalg.lib"; 206 LIB " polymake.lib";206 LIB "oldpolymake.lib"; 207 207 LIB "primdec.lib"; 208 208 LIB "absfact.lib"; … … 650 650 // pass first to a ring where a and @a 651 651 // are variables in order to use maps 652 string @mp= string(minpoly);652 poly mp=minpoly; 653 653 ring INTERRING=char(LIFTRING),(t,@a,a),dp; 654 execute("poly mp=" + @mp + ";");654 poly mp=imap(LIFTRING,mp); 655 655 ideal LIFT=imap(LIFTRING,LIFT); 656 656 kill LIFTRING; … … 1012 1012 { 1013 1013 def GLOBALRING=basering; 1014 string @mp= string(minpoly);1014 number mp=minpoly; 1015 1015 execute("ring LOCALRING=("+charstr(basering)+"),("+varstr(basering)+"),ds;"); 1016 execute("minpoly= " + @mp + ";");1017 1016 poly f=imap(GLOBALRING,f); 1017 minpoly=imap(GLOBALRING,mp); 1018 1018 } 1019 1019 // check if a substitution is necessary … … 1049 1049 if (minpoly!=0) 1050 1050 { 1051 string @mp= string(minpoly);1051 poly mp=minpoly; 1052 1052 def OLDRING=basering; 1053 1053 execute("ring NEWRING=0,("+varstr(basering)+","+parstr(basering)+"),ds;"); 1054 execute("ideal I = " + @mp + ";"); 1055 I = I,imap(OLDRING,f); 1054 ideal I=imap(OLDRING,mp),imap(OLDRING,f); 1056 1055 } 1057 1056 else … … 1065 1064 w=NewtP[jj]NewtP[jj+1]; 1066 1065 ggteiler=gcd(w[1],w[2]); 1067 zw=w[1] /ggteiler;1068 w[1]=w[2] /ggteiler;1066 zw=w[1] div ggteiler; 1067 w[1]=w[2] div ggteiler; 1069 1068 w[2]=zw; 1070 1069 // if we have introduced a third variable for the parameter, then w needs a third component … … 1134 1133 else 1135 1134 { 1136 string @mp= string(minpoly);1135 poly mp=minpoly; 1137 1136 ring degreering=0,a,dp; 1138 execute("poly mp=" + @mp + ";");1137 poly mp=imap(countring,mp); 1139 1138 numberofbranchesfound=numberofbranchesfound+deg(mp); 1140 1139 setring countring; … … 1158 1157 ring r=0,(x,y),ds; 1159 1158 poly f=x2y4+x5y7; 1160 puiseuxExpansion(puiseuxExpansion(f,3)); 1159 puiseuxExpansion(f,3,"subst"); 1160 displayPuiseuxExpansion(puiseuxExpansion(f,3)); 1161 1161 } 1162 1162 … … 1540 1540 ggt=gcd(normalvector[1],normalvector[2]); // the gcd of the entries 1541 1541 zw=normalvector[2]; // create the outward pointing normal vector 1542 normalvector[2]=normalvector[1] /ggt;1543 normalvector[1]=zw /ggt;1542 normalvector[2]=normalvector[1] div ggt; 1543 normalvector[1]=zw div ggt; 1544 1544 if (size(#)==0) // we are computing w.r.t. minimum 1545 1545 { … … 2718 2718 if(k<>j) // except the unit vector of the nonzero component 2719 2719 { 2720 intvec u; u[size(w)]=0; u[k]=1; 2721 O[r,1..size(w)]=u; r=r+1; 2720 intvec u; 2721 u[size(w)]=0; 2722 u[k]=1; 2723 O[r,1..size(w)]=u; 2724 r=r+1; 2725 kill u; 2722 2726 } 2723 2727 } … … 4708 4712 wneu=NewtP[1]NewtP[2]; 4709 4713 int ggteiler=gcd(wneu[1],wneu[2]); 4710 wneu[1]=wneu[1] /ggteiler;4711 wneu[2]=wneu[2] /ggteiler;4714 wneu[1]=wneu[1] div ggteiler; 4715 wneu[2]=wneu[2] div ggteiler; 4712 4716 if (wneu[1]>0) 4713 4717 { … … 4807 4811 for (jj=1;jj<=anzahlvariablen+numberdeletedvariables1;jj++) 4808 4812 { 4809 PARA[jj]=(PARA[jj]+a[jj+1])*t^(tw[jj+1]*tweight /ww[1]);4813 PARA[jj]=(PARA[jj]+a[jj+1])*t^(tw[jj+1]*tweight div ww[1]); 4810 4814 } 4811 4815 // if we have reached the stoplevel, i.e. either … … 5353 5357 if (koeffizienten[jord(p)+1]!=0) 5354 5358 { 5355 if ((j(N*wj) /w1)==0)5359 if ((j(N*wj) div w1)==0) 5356 5360 { 5357 5361 dp=dp+displaycoef(koeffizienten[jord(p)+1]); 5358 5362 } 5359 if (((j(N*wj) /w1)==1) and (N!=1))5363 if (((j(N*wj) div w1)==1) and (N!=1)) 5360 5364 { 5361 5365 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*t^(1/"+string(N)+")"; 5362 5366 } 5363 if (((j(N*wj) /w1)==1) and (N==1))5367 if (((j(N*wj) div w1)==1) and (N==1)) 5364 5368 { 5365 5369 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*t"; 5366 5370 } 5367 if (((j(N*wj) /w1)==1) and (N==1))5371 if (((j(N*wj) div w1)==1) and (N==1)) 5368 5372 { 5369 5373 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*1/t"; 5370 5374 } 5371 if (((j(N*wj) /w1)==1) and (N!=1))5375 if (((j(N*wj) div w1)==1) and (N!=1)) 5372 5376 { 5373 5377 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*1/t^(1/"+string(N)+")"; 5374 5378 } 5375 if (((j(N*wj) /w1)>1) and (N==1))5376 { 5377 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*t^"+string(j(N*wj) /w1);5378 } 5379 if (((j(N*wj) /w1)>1) and (N!=1))5380 { 5381 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*t^("+string(j(N*wj) /w1)+"/"+string(N)+")";5382 } 5383 if (((j(N*wj) /w1)<1) and (N==1))5379 if (((j(N*wj) div w1)>1) and (N==1)) 5380 { 5381 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*t^"+string(j(N*wj) div w1); 5382 } 5383 if (((j(N*wj) div w1)>1) and (N!=1)) 5384 { 5385 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*t^("+string(j(N*wj) div w1)+"/"+string(N)+")"; 5386 } 5387 if (((j(N*wj) div w1)<1) and (N==1)) 5384 5388 { 5385 5389 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*1/t^"+string(wjj); 5386 5390 } 5387 if (((j(N*wj) /w1)<1) and (N!=1))5388 { 5389 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*1/t^("+string((N*wj) /w1j)+"/"+string(N)+")";5391 if (((j(N*wj) div w1)<1) and (N!=1)) 5392 { 5393 dp=dp+displaycoef(koeffizienten[jord(p)+1])+"*1/t^("+string((N*wj) div w1j)+"/"+string(N)+")"; 5390 5394 } 5391 5395 if (j<deg(p)) … … 5495 5499 { 5496 5500 setring LIFTRing; 5497 string @mp= string(minpoly);5501 poly mp=minpoly; 5498 5502 execute("ring TESTRing=("+charstr(LIFTRing)+"),("+varstr(BASERING)+"),dp;"); 5499 execute("minpoly= " + @mp + ";");5503 minpoly=number(imap(LIFTRing,mp)); 5500 5504 ideal i=imap(BASERING,i); 5501 5505 } … … 5769 5773 wneu=NewtP[jjj]NewtP[jjj+1]; 5770 5774 int ggteiler=gcd(wneu[1],wneu[2]); 5771 wneu[1]=wneu[1] /ggteiler;5772 wneu[2]=wneu[2] /ggteiler;5775 wneu[1]=wneu[1] div ggteiler; 5776 wneu[2]=wneu[2] div ggteiler; 5773 5777 if (wneu[1]>0) 5774 5778 { … … 5869 5873 { 5870 5874 execute("ring PARARing=("+string(char(basering))+",@a),t,ls;"); 5871 minpoly=number(imap(PREGFANRING,m)); // ?5875 minpoly=number(imap(PREGFANRING,m)); 5872 5876 } 5873 5877 else … … 5908 5912 for (jjj=1;jjj<=anzahlvariablen+numberdeletedvariables1;jjj++) 5909 5913 { 5910 PARA[jjj]=(PARA[jjj]+zeros[size(zeros)][jjj+1])*t^(ww[jjj+1]*tweight /ww[1]);5914 PARA[jjj]=(PARA[jjj]+zeros[size(zeros)][jjj+1])*t^(ww[jjj+1]*tweight div ww[1]); 5911 5915 } 5912 5916 // delete the last entry in zero, since that one has … … 6033 6037 { 6034 6038 I=subst(i,var(lastvar),0); 6035 while ( subst(I[1],t,0)==0)6039 while ((I[1]!=0) and (subst(I[1],t,0)==0)) 6036 6040 { 6037 6041 I[1]=I[1]/t; … … 6910 6914 "USAGE: intmatcoldelete(w,i); w intmat, i int 6911 6915 RETURN: intmat, the integer matrix w with the ith comlumn deleted 6912 NOTE: the procedure is called by intmatsort and normalFan L"6916 NOTE: the procedure is called by intmatsort and normalFan" 6913 6917 { 6914 6918 if ((i<1) or (i>ncols(w)) or (ncols(w)==1)) … … 7814 7818 poly denom=delta*hn^5; 7815 7819 poly ggt=gcd(num,denom); 7816 num=num /ggt;7817 denom=denom /ggt;7820 num=num div ggt; 7821 denom=denom div ggt; 7818 7822 setring BASERING; 7819 7823 poly num=imap(TRING,num);
Note: See TracChangeset
for help on using the changeset viewer.