public class TransitiveClosureAnalysis extends Analysis
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
analyzer, changeAnalyzer, graph, valid
public TransitiveClosureAnalysis(Graph graph)
graph
- The given graph.public TransitiveClosureAnalysis(TransitiveClosureAnalyzer analyzer)
analyzer
- The given analyzer.public boolean pathExistence(Node startNode, Node endNode)
startNode
- The starting node.endNode
- The ending node.public java.lang.String toString()
public boolean[][] transitiveClosureMatrix()
Graph.nodeLabel(ptolemy.graph.Node)
public boolean validAnalyzerInterface(Analyzer analyzer)
validAnalyzerInterface
in class Analysis
analyzer
- The given analyzer.