Navigation
Synopsis A Graph datatype with associated functions.
Types alias Graph[&T] = rel[&T from, &T to];
Usage import analysis::graphs::Graph;
Description The Graph data type is a binary relation and all operators and functions defined on Relation are also defined on Graph.

The Graph library provides the following functions:
  • bottom: Determine the bottom nodes (leaves) of a graph.
  • connectedComponents: Determine the connected components of a graph.
  • Graph:
  • order: Compute topological order of the nodes in a graph.
  • predecessors: Determine the direct predecessors of a graph node.
  • reach: Determine the graph nodes reachable from a set of nodes.
  • reachR: Determine the graph nodes reachable from a set of nodes using a restricted set of intermediate nodes.
  • reachX: Determine the graph nodes reachable from a set of nodes excluding certain intermediate nodes.
  • shortestPathPair: Determine the shortest path between two graph nodes.
  • successors: Determine the direct successors of a graph node.
  • top: Determine the set of top nodes (roots) of a graph.
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.