ptolemy.graph.analysis.analyzer
Interface AllPairShortestPathAnalyzer

All Superinterfaces:
Analyzer, GraphAnalyzer
All Known Implementing Classes:
FloydWarshallAllPairShortestPathStrategy

public interface AllPairShortestPathAnalyzer
extends GraphAnalyzer

An interface for all the analyzers that compute the all pair shortest path of a directed graph.

Since:
Ptolemy II 4.0
Version:
$Id: AllPairShortestPathAnalyzer.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Shahrooz Shahparnia
See Also:
AllPairShortestPathAnalysis
Accepted Rating:
Red (ssb)
Proposed Rating:
Red (shahrooz)

Method Summary
 java.util.List shortestPath(Node startNode, Node endNode)
          Return the nodes on the shortest path from the node "startNode" to the node "endNode" in the form of an ordered list.
 double shortestPathLength(Node startNode, Node endNode)
          Return the length of the shortest path from the node startNode to the node endNode.
 double[][] shortestPathMatrix()
          A matrix representing the result of the all pair shortest path algorithm.
 
Methods inherited from interface ptolemy.graph.analysis.analyzer.GraphAnalyzer
graph
 
Methods inherited from interface ptolemy.graph.analysis.analyzer.Analyzer
toString, valid
 

Method Detail

shortestPath

java.util.List shortestPath(Node startNode,
                            Node endNode)
Return the nodes on the shortest path from the node "startNode" to the node "endNode" in the form of an ordered list.

Parameters:
startNode - The starting node of the path.
endNode - The ending node of the path.
Returns:
Return the nodes on the shortest path from the node "startNode" to the node "endNode" in the form of an ordered list.

shortestPathLength

double shortestPathLength(Node startNode,
                          Node endNode)
Return the length of the shortest path from the node startNode to the node endNode.

Parameters:
startNode - The starting node of the path.
endNode - The end node of the path.
Returns:
Return the length of the shortest path from the node startNode to the node endNode.

shortestPathMatrix

double[][] shortestPathMatrix()
A matrix representing the result of the all pair shortest path algorithm. The first dimension is indexed by the source node label while the second one is indexed by the sink node label.

Returns:
Return a matrix representing the result of the all pair shortest path algorithm.
See Also:
Graph.nodeLabel(ptolemy.graph.Node)