|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.graph.analysis.Analysis
ptolemy.graph.analysis.TransitiveClosureAnalysis
public class TransitiveClosureAnalysis
An analysis for the computation of transitive closure of a directed graph. While there is a path directed from node X to Y in the given graph, there is an edge from X to Y in the transformed graph. Generally, transitive closure is expressed in terms of square matrix with graph node labels as indices.
The transitiveClosureMatrix()
method returns the transitive closure of
the graph in the form of a two dimensional array. The first dimension represents
source node label while the second one represents sink node label.
Assume i and j are labels of two nodes. Matrix[i][j] is true if there is a path
on the graph from "i" to "j".
Graph.nodeLabel(ptolemy.graph.Node)
Red (ssb) |
Red (shahrooz) |
Constructor Summary | |
---|---|
TransitiveClosureAnalysis(Graph graph)
Construct an instance of this class for a given graph with a default analyzer. |
|
TransitiveClosureAnalysis(TransitiveClosureAnalyzer analyzer)
Construct an instance of this class with a given analyzer. |
Method Summary | |
---|---|
boolean |
pathExistence(Node startNode,
Node endNode)
Check if there exist a path between a starting node "startNode" and an ending node "endNode" on the graph under analysis. |
java.lang.String |
toString()
Return a description of the analysis and the associated analyzer. |
boolean[][] |
transitiveClosureMatrix()
Compute the transitive closure of the graph under analysis in the form of two dimensional array. |
boolean |
validAnalyzerInterface(Analyzer analyzer)
Check if a given analyzer is compatible with this analysis. |
Methods inherited from class ptolemy.graph.analysis.Analysis |
---|
analyzer, changeAnalyzer, graph, valid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TransitiveClosureAnalysis(Graph graph)
graph
- The given graph.public TransitiveClosureAnalysis(TransitiveClosureAnalyzer analyzer)
analyzer
- The given analyzer.Method Detail |
---|
public boolean pathExistence(Node startNode, Node endNode)
startNode
- The starting node.endNode
- The ending node.
public java.lang.String toString()
toString
in class Analysis
public boolean[][] transitiveClosureMatrix()
Graph.nodeLabel(ptolemy.graph.Node)
public boolean validAnalyzerInterface(Analyzer analyzer)
validAnalyzerInterface
in class Analysis
analyzer
- The given analyzer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |