Changeset addf91 in git
- Timestamp:
- Nov 16, 2016, 5:00:33 PM (7 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- cff7b64b4d12f3390c62da92777b8ebeaa828f74
- Parents:
- e09ceb1a13d66dc87c9c17bd158486e701335e88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/schubert.lib
re09ceb raddf91 65 65 quotSheaf(sheaf,sheaf) make the quotient of two sheaves 66 66 addSheaf(sheaf,sheaf) make the direct sum of two sheaves 67 makeGraph (list,list)create a graph from a list of vertices67 makeGraphVE(list,list) create a graph from a list of vertices 68 68 and a list of edges 69 printGraph (graph) print procedure for graphs69 printGraphG(graph) print procedure for graphs 70 70 moduliSpace(variety,int) create a moduli space of stable maps as 71 71 an algebraic stack … … 89 89 sumofquotients(stack,list) prepare a command for parallel 90 90 computation 91 part(poly,int)compute a homogeneous component of a91 homog_part(poly,int) compute a homogeneous component of a 92 92 polynomial. 93 parts(poly,int,int)compute the sum of homogeneous93 homog_parts(poly,int,int) compute the sum of homogeneous 94 94 components of a polynomial 95 95 logg(poly,int) compute Chern characters from total … … 136 136 system("install","sheaf","-",quotSheaf,2); 137 137 system("install","sheaf","^",symmetricPowerSheaf,2); 138 system("install","graph","print",printGraph ,1);138 system("install","graph","print",printGraphG,1); 139 139 system("install","stack","print",printStack,1); 140 140 } … … 951 951 //////////////////////////////////////////////////////////////////////////////// 952 952 953 proc printGraph (graph G)954 "USAGE: printGraph (G); G graph953 proc printGraphG(graph G) 954 "USAGE: printGraphG(G); G graph 955 955 ASSUME: G is a graph. 956 956 THEORY: This is the print function used by Singular to print a graph. 957 957 KEYWORDS: graph 958 EXAMPLE: example printGraph ; shows an example958 EXAMPLE: example printGraphG; shows an example 959 959 " 960 960 { … … 965 965 "EXAMPLE:"; echo=2; 966 966 ring r = 0,x,dp; 967 graph G = makeGraph (list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))),967 graph G = makeGraphVE(list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))), 968 968 list(list(0,1,2))); 969 969 G; 970 970 } 971 971 972 proc makeGraph (list v, list e)973 "USAGE: makeGraph (v,e); v list, e list972 proc makeGraphVE(list v, list e) 973 "USAGE: makeGraphVE(v,e); v list, e list 974 974 ASSUME: v is a list of vertices, e is a list of edges. 975 975 RETURN: graph with vertices v and edges e. 976 976 THEORY: Creates a graph from a list of vertices and edges. 977 977 KEYWORDS: graph 978 EXAMPLE: example makeGraph ; shows an example978 EXAMPLE: example makeGraphVE; shows an example 979 979 { 980 980 graph G; … … 987 987 "EXAMPLE:"; echo=2; 988 988 ring r = 0,x,dp; 989 graph G = makeGraph (list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))),989 graph G = makeGraphVE(list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))), 990 990 list(list(0,1,2))); 991 991 G; … … 1559 1559 } 1560 1560 1561 proc part(poly f, int n)1562 "USAGE: part(f,n); f poly, n int1561 proc homog_part(poly f, int n) 1562 "USAGE: homog_part(f,n); f poly, n int 1563 1563 RETURN: poly 1564 1564 PURPOSE: computing the homogeneous component of a polynomial. 1565 EXAMPLE: example part; shows examples1565 EXAMPLE: example homog_part; shows examples 1566 1566 " 1567 1567 { … … 1579 1579 ring r = 0,(x,y,z),wp(1,2,3); 1580 1580 poly f = 1+x+x2+x3+x4+y+y2+y3+z+z2+xy+xz+yz+xyz; 1581 part(f,0);1582 part(f,1);1583 part(f,2);1584 part(f,3);1585 part(f,4);1586 part(f,5);1587 part(f,6);1588 } 1589 1590 proc parts(poly f, int i, int j)1591 "USAGE: parts(f,i,j); f poly, i int, j int1581 homog_part(f,0); 1582 homog_part(f,1); 1583 homog_part(f,2); 1584 homog_part(f,3); 1585 homog_part(f,4); 1586 homog_part(f,5); 1587 homog_part(f,6); 1588 } 1589 1590 proc homog_parts(poly f, int i, int j) 1591 "USAGE: homog_parts(f,i,j); f poly, i int, j int 1592 1592 RETURN: poly 1593 1593 THEORY: computing a polynomial which is the sum of the homogeneous 1594 1594 components of a polynomial. 1595 EXAMPLE: example parts; shows examples1595 EXAMPLE: example homog_parts; shows examples 1596 1596 " 1597 1597 { … … 1600 1600 for (k=i;k<=j;k++) 1601 1601 { 1602 p=p+ part(f,k);1602 p=p+homog_part(f,k); 1603 1603 } 1604 1604 return (p); … … 1609 1609 ring r = 0,(x,y,z),wp(1,2,3); 1610 1610 poly f = 1+x+x2+x3+x4+y+y2+y3+z+z2+xy+xz+yz+xyz; 1611 parts(f,2,4);1611 homog_parts(f,2,4); 1612 1612 } 1613 1613 … … 1622 1622 int i,j,k,m; 1623 1623 if (n==0) {p=0;} 1624 if (n==1) {p= part(f,1);}1624 if (n==1) {p=homog_part(f,1);} 1625 1625 else 1626 1626 { 1627 list l=- part(f,1);1627 list l=-homog_part(f,1); 1628 1628 for (j=2;j<=n;j++) 1629 1629 { … … 1631 1631 for (k=1;k<j;k++) 1632 1632 { 1633 q=q+ part(f,k)*l[j-k];1633 q=q+homog_part(f,k)*l[j-k]; 1634 1634 } 1635 q=-j* part(f,j)-q;1635 q=-j*homog_part(f,j)-q; 1636 1636 l=insert(l,q,size(l)); 1637 1637 kill q; … … 1670 1670 for (j=1;j<=i;j++) 1671 1671 { 1672 q=q+factorial(j)*(-1)^(j-1)*l[i-j+1]* part(f,j)/i;1672 q=q+factorial(j)*(-1)^(j-1)*l[i-j+1]*homog_part(f,j)/i; 1673 1673 } 1674 1674 l=insert(l,q,size(l)); … … 1696 1696 for (i=0;i<=deg(f);i++) 1697 1697 { 1698 p=p+n^i* part(f,i);1698 p=p+n^i*homog_part(f,i); 1699 1699 } 1700 1700 return (p); … … 1715 1715 for (j=1;j<=i;j++) 1716 1716 { 1717 q=q+((-1)^(i-j))* parts(l[j]*adams(f,i-j+1),0,d)/i;1717 q=q+((-1)^(i-j))*homog_parts(l[j]*adams(f,i-j+1),0,d)/i; 1718 1718 } 1719 1719 l=insert(l,q,size(l)); … … 1733 1733 for (j=1;j<=n;j++) 1734 1734 { 1735 M[i,j] = part(f,p[i]+j-i);1735 M[i,j] = homog_part(f,p[i]+j-i); 1736 1736 } 1737 1737 } … … 1973 1973 poly g = var(1)^r; 1974 1974 int i; 1975 for (i=1;i<=r;i++) {g=g+var(1)^(r-i)* part(c,i);}1975 for (i=1;i<=r;i++) {g=g+var(1)^(r-i)*homog_part(c,i);} 1976 1976 A.relations = rels,g; 1977 1977 poly u = 1 + var(1); … … 2195 2195 setring R; 2196 2196 poly f = S.ChernCharacter; 2197 return (int( part(f,0)));2197 return (int(homog_part(f,0))); 2198 2198 } 2199 2199 example … … 2249 2249 " 2250 2250 { 2251 return ( part(totalChernClass(S),i));2251 return (homog_part(totalChernClass(S),i)); 2252 2252 } 2253 2253 example … … 2314 2314 int i,j; 2315 2315 for (i=0;i<=d;i++) {t = t + (1-f)^i;} 2316 for (j=0;j<=d;j++) {h = h + part(t,j);}2316 for (j=0;j<=d;j++) {h = h + homog_part(t,j);} 2317 2317 return (reduce(h,rels)); 2318 2318 } … … 2379 2379 S.currentVariety = V2; 2380 2380 poly c = imap(R1,c1); 2381 poly f = parts(c*c2,0,V2.dimension);2381 poly f = homog_parts(c*c2,0,V2.dimension); 2382 2382 S.ChernCharacter = f; 2383 2383 return (S); … … 2388 2388 S.currentVariety = V1; 2389 2389 poly c = imap(R2,c2); 2390 poly f = parts(c1*c,0,V1.dimension);2390 poly f = homog_parts(c1*c,0,V1.dimension); 2391 2391 S.ChernCharacter = f; 2392 2392 return (S); … … 2435 2435 for (j=1;j<=m;j++) 2436 2436 { 2437 q = q + ((-1)^(j+1))* parts(w[j+1]*s[i-j+1],0,d);2437 q = q + ((-1)^(j+1))*homog_parts(w[j+1]*s[i-j+1],0,d); 2438 2438 } 2439 2439 s = insert(s,q,size(s));
Note: See TracChangeset
for help on using the changeset viewer.