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 |
The object isSource is a method function.