Changeset e84f07d in git for Singular/LIB/polymake.lib
- Timestamp:
- Mar 16, 2009, 12:34:10 PM (14 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- bc103b1993b606247dbfebaa278db1467ca2c15b
- Parents:
- a81e0b7a47bc8fc3194c348a4291cf22ceed6c27
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/polymake.lib
ra81e0b7 re84f07d 1 version="$Id: polymake.lib,v 1.1 0 2009-01-14 16:07:05 SingularExp $";1 version="$Id: polymake.lib,v 1.11 2009-03-16 11:34:10 keilen Exp $"; 2 2 category="Tropical Geometry"; 3 3 info=" … … 348 348 "USAGE: normalFan (vert,aff,graph,rays,[,#]); vert,aff intmat, graph list, rays int, # string 349 349 ASSUME: - vert is an integer matrix whose rows are the coordinate of the vertices of 350 a convex lattice poly gon;350 a convex lattice polytope; 351 351 @* - aff describes the affine hull of this polytope, i.e. 352 352 the smallest affine space containing it, in the following sense: … … 1032 1032 @* L[1][i][1] = integer matrix representing the inequalities which describe the 1033 1033 cone dual to the ith vertex 1034 @* L[1][i][2] = a list which contains the inequalities represented by L[ i][1]1034 @* L[1][i][2] = a list which contains the inequalities represented by L[1][i][1] 1035 1035 as a list of strings, where we use the variables x(1),...,x(n) 1036 1036 @* L[1][i][3] = only present if 'er' is set to 1; in that case it is an interger matrix … … 2148 2148 RETURN: none" 2149 2149 { 2150 if ( i==1)2150 if ((i==1) and (defined(polymakekeeptmpfiles)==0)) 2151 2151 { 2152 2152 int polymakekeeptmpfiles; 2153 export polymakekeeptmpfiles;2154 } 2155 else2153 export(polymakekeeptmpfiles); 2154 } 2155 if (i!=1) 2156 2156 { 2157 2157 if (defined(polymakekeeptmpfiles)) … … 2515 2515 2516 2516 2517 /*2518 proc ADeterminant (list polygon,list #)2519 {2520 list triangs=triangulations(polygon);2521 list sppg=splitPolygon(polygon);2522 list etavectors;2523 int i,j;2524 int stop;2525 for (i=1;i<=size(triangs);i++)2526 {2527 etavectors[i]=eta(triangs[i],sppg);2528 }2529 size(etavectors);2530 2531 for (i=size(etavectors);i>=2;i--)2532 {2533 stop=0;2534 for (j=1;(j<i) and (stop==0);j++)2535 {2536 if (etavectors[i]==etavectors[j])2537 {2538 etavectors=delete(etavectors,i);2539 stop=1;2540 }2541 }2542 }2543 size(etavectors);2544 if (size(#)>0)2545 {2546 execute("ring ADring=(0,a(1.."+string(size(etavectors))+")),("+polygonToCoordinates(polygon)[1]+"),lp;");2547 list terme;2548 poly ad,term;2549 matrix XE[1][1];2550 for (i=1;i<=size(etavectors);i++)2551 {2552 term=1;2553 for (j=1;j<=nvars(basering);j++)2554 {2555 term=term*var(j)^etavectors[i][j];2556 }2557 terme[i]=term;2558 ad=ad+a(i)*term;2559 }2560 matrix M[size(etavectors)][nvars(basering)];2561 for (i=1;i<=size(etavectors);i++)2562 {2563 }2564 return(list(etavectors,string(ad)));2565 2566 2567 }2568 2569 return(etavectors);2570 }2571 2572 proc adsub ()2573 {2574 ring r=0,(x,y,u00,u10,u20,u01,u11,u02,a(1..5)),dp;2575 poly f1=(3x-y+1)*(2x+y+1);2576 poly f2=(7x+2y-1)*(x+y);2577 poly f3=(x-y-2)*(x+y+3);2578 poly f4=(17x-11y+3)*(x+7y-2);2579 poly f5=(x+2y-7)*(3x+3y-1);2580 poly f6=(2x+12y-17)*(33x-3y-1);2581 matrix M1=coeffs(f1,ideal(1,x,x2,y,xy,y2));2582 matrix M2=coeffs(f2,ideal(1,x,x2,y,xy,y2));2583 matrix M3=coeffs(f3,ideal(1,x,x2,y,xy,y2));2584 matrix M4=coeffs(f4,ideal(1,x,x2,y,xy,y2));2585 matrix M5=coeffs(f5,ideal(1,x,x2,y,xy,y2));2586 matrix M6=coeffs(f6,ideal(1,x,x2,y,xy,y2));2587 poly f=(a(5))*u00*u20*u02+(a(3))*u00*u11^2+(a(4))*u10^2*u02+(a(2))*u10*u01*u11+(a(1))*u20*u01^2;2588 poly g1=substitute(f,u00,M1[1,1],u10,M1[2,1],u20,M1[3,1],u01,M1[4,1],u11,M1[5,1],u02,M1[6,1]);2589 poly g2=substitute(f,u00,M2[1,1],u10,M2[2,1],u20,M2[3,1],u01,M2[4,1],u11,M2[5,1],u02,M2[6,1]);2590 poly g3=substitute(f,u00,M3[1,1],u10,M3[2,1],u20,M3[3,1],u01,M3[4,1],u11,M3[5,1],u02,M3[6,1]);2591 poly g4=substitute(f,u00,M4[1,1],u10,M4[2,1],u20,M4[3,1],u01,M4[4,1],u11,M4[5,1],u02,M4[6,1]);2592 poly g5=substitute(f,u00,M5[1,1],u10,M5[2,1],u20,M5[3,1],u01,M5[4,1],u11,M5[5,1],u02,M5[6,1]);2593 poly g6=substitute(f,u00,M6[1,1],u10,M6[2,1],u20,M6[3,1],u01,M6[4,1],u11,M6[5,1],u02,M6[6,1]);2594 ideal i=g1,g2,g3,g4,g5,g6;2595 option(redSB);2596 ideal j=std(i);2597 poly ff=substitute(f,a(5),4,a(4),-1,a(3),-1,a(2),1,a(1),-1);2598 return(string(ff));2599 }2600 2601 */
Note: See TracChangeset
for help on using the changeset viewer.