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

parents -- returns the parents of a vertex on a digraph

Description

The parents of a vertex v in a digraph D are all the vertexSet u in D such that {u,v} is an edge of D. In other words, the parents of v are all the vertexSet that have edges coming out of them that point at v.

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

o2 = set {e, a}

o2 : Set

See also

Ways to use parents:

  • parents(Digraph,Thing)

For the programmer

The object parents is a method function.


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