Macaulay2 » Documentation
Packages » EdgeIdeals :: vertices(HyperGraph)
next | previous | forward | backward | up | index | toc

vertices(HyperGraph) -- gets the vertices of a (hyper)graph

Synopsis

Description

This function takes a graph or hypergraph and returns the vertex set of the graph.

i1 : S = QQ[a..d];
i2 : g = graph {a*b,b*c,c*d,d*a} -- the four cycle

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

o2 : Graph
i3 : vertices g

o3 = {a, b, c, d}

o3 : List
i4 : h = hyperGraph{a*b*c}

o4 = HyperGraph{"edges" => {{a, b, c}}    }
                "ring" => S
                "vertices" => {a, b, c, d}

o4 : HyperGraph
i5 : vertices h  -- the vertex d is treated as an isolated vertex

o5 = {a, b, c, d}

o5 : List

See also

Ways to use this method: