Macaulay2 » Documentation
Packages » StatGraphs :: graph(MixedGraph)
next | previous | forward | backward | up | index | toc

graph(MixedGraph) -- convert mixed graph to a hash table

Synopsis

Description

This method creates a hash table whose key-value pairs correspond to the components of G.

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 : graph G

o2 = HashTable{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}

o2 : HashTable
i3 : keys (graph G)

o3 = {Digraph, Graph, Bigraph}

o3 : List
i4 : (graph G)#Bigraph === bigraph G

o4 = true

See also

Ways to use this method: