![]() |
|
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} ![]() |