Macaulay2 » Documentation
Packages » EdgeIdeals :: completeGraph
next | previous | forward | backward | up | index | toc

completeGraph -- returns a complete graph

Synopsis

Description

This function returns a special graph, the complete graph. The input specifies a set of vertices that will have the property that every vertex is adjacent to every other vertex. Non-specified vertices are treated as isolated vertices.

i1 : R = QQ[a,b,c,d,e];
i2 : completeGraph R

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

o2 : Graph
i3 : completeGraph(R,3)

o3 = Graph{"edges" => {{a, b}, {a, c}, {b, c}}}
           "ring" => R
           "vertices" => {a, b, c, d, e}

o3 : Graph
i4 : completeGraph {a,c,e}

o4 = Graph{"edges" => {{a, c}, {a, e}, {c, e}}}
           "ring" => R
           "vertices" => {a, b, c, d, e}

o4 : Graph

See also

Ways to use completeGraph :

For the programmer

The object completeGraph is a method function.