Navigation
Synopsis Determine the set of top nodes (roots) of a graph.
Function set[&T] top(Graph[&T] G)
Usage import analysis::graphs::Graph;
Description Returns the top nodes of Graph G, i.e., the root nodes that do not have any predecessors.
Examples
rascal>import analysis::graphs::Graph;
ok
rascal>top({<1,2>, <1,3>, <2,4>, <3,4>});
set[int]: {1}
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.