next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Graphs :: nondescendents

nondescendents -- Returns the nondescendents of a node in a digraph

Synopsis

Description

This function takes as input a digraph and the name given to the node of interest. It returns the set of vertices that are not descendents of that node.
i1 : D = digraph({{a, {b,c}}, {b,{d,e}}, {c, {e,h}}, {d, {f}}, {e, {f,g}},
         {f, {}}, {g, {}}, {h, {}}})

o1 = Digraph{a => set {b, c}}
             b => set {d, e}
             c => set {e, h}
             d => set {f}
             e => set {f, g}
             f => set {}
             g => set {}
             h => set {}

o1 : Digraph
i2 : nD = nondescendents(D,c)

o2 = set {a, b, d}

o2 : Set

Ways to use nondescendents :