Sophie

Sophie

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

Macaulay2-1.3.1-8.fc15.i686.rpm

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

i1 : S = QQ[a..f];

i2 : g = cycle S

o2 = Graph{edges => {{a, b}, {b, c}, {c, d}, {d, e}, {e, f}, {a, f}}}
           ring => S
           vertices => {a, b, c, d, e, f}

o2 : Graph

i3 : edges g

o3 = {{a, b}, {b, c}, {c, d}, {d, e}, {e, f}, {a, f}}

o3 : List

i4 : getEdge (g,3)  -- counting starts from 0, so the 4th element in the above list

o4 = {d, e}

o4 : List

i5 : h = hyperGraph {a*b*c*d,d*e,a*f*c,a*d*f}

o5 = HyperGraph{edges => {{a, b, c, d}, {d, e}, {a, c, f}, {a, d, f}}}
                ring => S
                vertices => {a, b, c, d, e, f}

o5 : HyperGraph

i6 : getEdge (h,0) -- first edge

o6 = {a, b, c, d}

o6 : List

i7 :