Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 1752

Macaulay2-1.3.1-8.fc15.i686.rpm

-- -*- M2-comint -*- {* hash: -1033826181 *}

i1 : S = QQ[z_1..z_8];

i2 : h = hyperGraph {z_2*z_3*z_4,z_6*z_8,z_7*z_5,z_1*z_6*z_7,z_2*z_4*z_8}

o2 = HyperGraph{edges => {{z , z , z }, {z , z }, {z , z , z }, {z , z , z }, {z , z }}}
                            2   3   4     5   7     1   6   7     2   4   8     6   8
                ring => S
                vertices => {z , z , z , z , z , z , z , z }
                              1   2   3   4   5   6   7   8

o2 : HyperGraph

i3 : edges h

o3 = {{z , z , z }, {z , z }, {z , z , z }, {z , z , z }, {z , z }}
        2   3   4     5   7     1   6   7     2   4   8     6   8

o3 : List

i4 : getEdgeIndex (h,{z_2,z_4,z_8})  -- although entered last, edge is internally stored in 4th spot (counting begins at 0)

o4 = 3

i5 : getEdge(h,3)

o5 = {z , z , z }
       2   4   8

o5 : List

i6 : getEdgeIndex (h,{z_1,z_2}) -- not in the edge list

o6 = -1

i7 :