|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.upc.dama.dex.tasks.Task
edu.upc.dama.dex.tasks.CompositeTask
edu.upc.dama.dex.algorithms.Connectivity
edu.upc.dama.dex.algorithms.StrongConnectivity
edu.upc.dama.dex.algorithms.StrongConnectivityGabow
public class StrongConnectivityGabow
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:
Connectivity.addEdge(int edgetype) for adding one edge type and
Connectivity.addAllEdges() for adding all edge types.
Connectivity.addNode(int nodetype)
for adding one node type and Connectivity.addAllNodes() for adding all
node types.
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.
| 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 |
|---|
public StrongConnectivityGabow(Graph graph)
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.
graph - Graph on which the algorithm will be run.| Method Detail |
|---|
public void close()
ConnectivityOnce executed, the instance becomes invalid.
close in class Connectivitypublic void run()
ConnectivityThis method can be called only once.
run in class Connectivity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||