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



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 :

For the programmer

The object isSource is a method function.