ptolemy.graph.analysis.analyzer
Interface TransitiveClosureAnalyzer
- All Superinterfaces:
- Analyzer, GraphAnalyzer
- All Known Implementing Classes:
- FloydWarshallTransitiveClosureStrategy
public interface TransitiveClosureAnalyzer
- extends GraphAnalyzer
An interface to the analyzers for the computation of transitive closure
of a directed graph.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: TransitiveClosureAnalyzer.java 38798 2005-07-08 20:00:01Z cxh $
- Author:
- Shahrooz Shahparnia
- See Also:
TransitiveClosureAnalysis
- Accepted Rating:
- Proposed Rating:
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. |
boolean[][] |
transitiveClosureMatrix()
Return the transitive closure of the graph under analysis in the
form of two dimensional array. |
pathExistence
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.
- Parameters:
startNode
- The starting node.endNode
- The ending node.
- Returns:
- True if such a path exists.
transitiveClosureMatrix
boolean[][] transitiveClosureMatrix()
- Return the transitive closure of the graph under analysis in the
form of 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.
The value of
transitiveClosureMatrix()
[i][j] is true if there
is a path on the graph from "i" to "j".
- Returns:
- The transitive closure in the form of 2D array.
- See Also:
Graph.nodeLabel(ptolemy.graph.Node)