edu.upc.dama.dex.algorithms
Class StrongConnectivityGabow

java.lang.Object
  extended by edu.upc.dama.dex.tasks.Task
      extended by edu.upc.dama.dex.tasks.CompositeTask
          extended by edu.upc.dama.dex.algorithms.Connectivity
              extended by edu.upc.dama.dex.algorithms.StrongConnectivity
                  extended by edu.upc.dama.dex.algorithms.StrongConnectivityGabow
All Implemented Interfaces:
Algorithm

public class StrongConnectivityGabow
extends StrongConnectivity

This class can be used to solve the problem of finding strongly connected components in a directed graph.

Concretely, it consists in finding components where every pair (u,v) of nodes contained in it has a path from u to v using the specified direction for each edge type. This implementation is based on the Gabow algorithm.

It is possible to set some restrictions after constructing a new instance of this class and before running it in order to limit the results. Those restrictions are:

For each instance of this class, it is only allowed to run the algorithm once.

After the execution, we can retrieve the results stored in an instance of the class ConnectedComponents using the Connectivity.getConnectedComponents() method. Please, see edu.upc.dama.dex.algorithms for further information related to how to use this class.

NOTE: It is required to indicate the set of edge types and node types before running this algorithm.

Author:
Sparsity Technologies

Field Summary
 
Fields inherited from interface edu.upc.dama.dex.algorithms.Algorithm
NAVIGATION_BACKWARD, NAVIGATION_FORWARD, NAVIGATION_UNDIRECTED
 
Constructor Summary
StrongConnectivityGabow(Graph graph)
          Creates a new instance of StrongConnectivityGabow.
 
Method Summary
 void close()
          Closes the instance.
 void run()
          Runs the algorithm in order to find the connected components.
 
Methods inherited from class edu.upc.dama.dex.algorithms.Connectivity
addAllEdges, addAllNodes, addEdge, addNode, getConnectedComponents, setMaterializedAttribute
 
Methods inherited from class edu.upc.dama.dex.tasks.CompositeTask
cancel, execute, init
 
Methods inherited from class edu.upc.dama.dex.tasks.Task
main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrongConnectivityGabow

public StrongConnectivityGabow(Graph graph)
Creates a new instance of StrongConnectivityGabow. After creating this instance is required to indicate the set of edge types and the set of node types which will be navigated through while traversing the graph in order to find the strong connected components.

Parameters:
graph - Graph on which the algorithm will be run.
Method Detail

close

public void close()
Description copied from class: Connectivity
Closes the instance.

Once executed, the instance becomes invalid.

Specified by:
close in class Connectivity

run

public void run()
Description copied from class: Connectivity
Runs the algorithm in order to find the connected components.

This method can be called only once.

Specified by:
run in class Connectivity