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

isSource -- determines if a vertex of a digraph is a source or not

Description

A vertex v of a Digraph D is a source if v has no parents

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

o2 = false
i3 : isSource (D,e)

o3 = true

See also

Ways to use isSource:

  • isSource(Digraph,Thing)

For the programmer

The object isSource is a method function.


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