annas.graph.util
Class Tarjan<N,A extends ArcInterface<N>>

java.lang.Object
  extended by annas.graph.util.Tarjan<N,A>
Type Parameters:
N - Node type
A - Arc type

public class Tarjan<N,A extends ArcInterface<N>>
extends java.lang.Object

Tarjan's Algorithm (named for its discoverer, Robert Tarjan) is a graph theory algorithm for finding the strongly connected components of a graph. As described in Tarjan, R.: Depth-first search and linear graph algorithms, SIAM J. Com- put. 1, no. 2, pp. 146–160

Author:
Sam Wilson

Constructor Summary
Tarjan(GraphInterface<N,A> graph)
           
 
Method Summary
 java.util.ArrayList<java.util.ArrayList<N>> execute()
          executes Tarjan's algorithm of the suppled graph
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tarjan

public Tarjan(GraphInterface<N,A> graph)
Method Detail

execute

public java.util.ArrayList<java.util.ArrayList<N>> execute()
executes Tarjan's algorithm of the suppled graph

Returns:
A list of lists of node which belong to the same component