A vertex v of a Digraph D is a sink if v has no children
i1 : D = digraph({a,b,c,d,e},{{a,b},{b,c},{b,d},{e,b}}); |
i2 : isSink (D,b) o2 = false |
i3 : isSink (D,d) o3 = true |
The object isSink is a method function.