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

forefathers(MixedGraph,Thing) -- return the forefathers of a vertex of a mixed graph

Synopsis

Description

The forefathers of v are the all the vertices u such that v is reachable from u in the directed edge set of the MixedGraph G.

The output also includes the vertex v from the input in the set of the forefathers.

i1 : G = mixedGraph(graph{{3,1}},digraph {{1,2},{2,3}},bigraph {{3,4},{2,4}})

o1 = MixedGraph{Bigraph => Bigraph{2 => {4}   }}
                                   3 => {4}
                                   4 => {3, 2}
                Digraph => Digraph{1 => {2}}
                                   2 => {3}
                                   3 => {}
                Graph => Graph{1 => {3}}
                               3 => {1}

o1 : MixedGraph
i2 : foreFathers (G,1)

o2 = set {1}

o2 : Set
i3 : foreFathers (G,2)

o3 = set {1, 2}

o3 : Set
i4 : foreFathers (G,3)

o4 = set {1, 2, 3}

o4 : Set

See also

Ways to use this method: