Macaulay2 » Documentation
Packages » Graphs :: children
next | previous | forward | backward | up | index | toc

children -- returns the children of a vertex of a digraph

Description

The children of v are the all the vertices u such that {v,u} is in the edge set of the digraph D. So the children of a vertex v are exactly those vertices on a directed graph that v points to.

i1 : D = digraph({a,b,c,d,e},{{a,b},{b,c},{b,d},{e,b}});
i2 : children(D, b)

o2 = set {c, d}

o2 : Set

See also

Ways to use children:

  • children(Digraph,Thing)

For the programmer

The object children is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/Graphs.m2:3096:0.