Macaulay2 » Documentation
Packages » StatGraphs :: undirectedGraph
next | previous | forward | backward | up | index | toc

undirectedGraph -- extract the undirected graph component of a mixed graph

Synopsis

Description

This method extracts the largest component of class Graph of a mixed graph.

i1 : G= mixedGraph(graph{{a,b},{b,c}},digraph {{a,d},{c,e},{f,g}},bigraph {{d,e}})

o1 = MixedGraph{Bigraph => Bigraph{d => {e}}}
                                   e => {d}
                Digraph => Digraph{a => {d}}
                                   c => {e}
                                   d => {}
                                   e => {}
                                   f => {g}
                                   g => {}
                Graph => Graph{a => {b}   }
                               b => {a, c}
                               c => {b}

o1 : MixedGraph
i2 : undirectedGraph G

o2 = Graph{a => {b}   }
           b => {a, c}
           c => {b}

o2 : Graph

See also

Ways to use undirectedGraph :

For the programmer

The object undirectedGraph is a method function.