Package jenkins.util

Class DirectedGraph<N>

java.lang.Object
jenkins.util.DirectedGraph<N>

public abstract class DirectedGraph<N> extends Object
A possible cyclic directed graph. This class defines various algorithms on a directed graph that's not necessarily acyclic.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • DirectedGraph

      public DirectedGraph()
  • Method Details

    • nodes

      protected abstract Collection<N> nodes()
      All the vertices of the nodes.
    • forward

      protected abstract Collection<N> forward(N node)
      Forward traversal of the edges.
    • getStronglyConnectedComponents

      public List<DirectedGraph.SCC<N>> getStronglyConnectedComponents()
      Performs the Tarjan's algorithm and computes strongly-connected components from the sink to source order. See the Wikipedia page.