nz.ac.waikato.mcennis.rat.reusablecores
Class FindStronglyConnectedComponentsCore

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.model.ModelShell
      extended by nz.ac.waikato.mcennis.rat.reusablecores.FindStronglyConnectedComponentsCore
All Implemented Interfaces:
Model

public class FindStronglyConnectedComponentsCore
extends ModelShell

Class for finding only components that are strongly connected. A strongly connected component is a sub-graph where their exists a path from every actor in the component to every actor in the component.


Field Summary
 
Fields inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell
listener
 
Constructor Summary
FindStronglyConnectedComponentsCore()
           
 
Method Summary
 void execute(Graph g)
          Creates sub-graphs consisting of all strongly connected componenents in the graph.
 Graph[] getGraph()
          Array of newly created subgraphs.
protected  Graph getGraph(Graph g)
           
 java.lang.String getGraphClass()
          return the string representing the class of sub-graph to create
 java.lang.String getGraphPrefix()
          Return the prefix used to name new graph-ids
 java.lang.String getMode()
          Which mode of actors in the graph should be used in calculations
 java.lang.String getRelation()
          Relation of link in the graph to use in calculations
 void setGraphClass(java.lang.String g)
          Set the string determining the class of sub-graph to create
 void setGraphPrefix(java.lang.String g)
          Set the string prefix used to generate ids for new sub-graphs
 void setMode(java.lang.String m)
          Set which mode of actors in the graph are to be used
 void setRelation(java.lang.String r)
          Set which relation of links in the graph to use
protected  void strongConnect(Actor start, Graph g)
           
 
Methods inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell
addListener, fireChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindStronglyConnectedComponentsCore

public FindStronglyConnectedComponentsCore()
Method Detail

execute

public void execute(Graph g)
Creates sub-graphs consisting of all strongly connected componenents in the graph. These sub-graphs are disjoint and spanning of the original graph.

Parameters:
g - graph to be analyzed

strongConnect

protected void strongConnect(Actor start,
                             Graph g)

getGraph

protected Graph getGraph(Graph g)

setRelation

public void setRelation(java.lang.String r)
Set which relation of links in the graph to use

Parameters:
r - relation of links to utilize

setMode

public void setMode(java.lang.String m)
Set which mode of actors in the graph are to be used

Parameters:
m - mode of actors to utilize

getRelation

public java.lang.String getRelation()
Relation of link in the graph to use in calculations

Returns:
relation of links to utilize

getMode

public java.lang.String getMode()
Which mode of actors in the graph should be used in calculations

Returns:
mode of actors to utilize

getGraph

public Graph[] getGraph()
Array of newly created subgraphs. Is null no graphs are created. Graphs are not created if 1 or 0 subgrahs are found. Returns null if no graph has been run against the object.

Returns:
array of created sub-graphs

setGraphPrefix

public void setGraphPrefix(java.lang.String g)
Set the string prefix used to generate ids for new sub-graphs

Parameters:
g - new prefix for graph ids

getGraphPrefix

public java.lang.String getGraphPrefix()
Return the prefix used to name new graph-ids

Returns:
prefix for sub-graph components

setGraphClass

public void setGraphClass(java.lang.String g)
Set the string determining the class of sub-graph to create

Parameters:
g - class of sub-graph to create

getGraphClass

public java.lang.String getGraphClass()
return the string representing the class of sub-graph to create

Returns:
class of sub-graph to create

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads