Package ptolemy.graph.analysis.analyzer
Interface SingleSourceLongestPathAnalyzer
-
- All Superinterfaces:
Analyzer
,GraphAnalyzer
- All Known Implementing Classes:
AllEdgeSingleSourceLongestPathStrategy
public interface SingleSourceLongestPathAnalyzer extends GraphAnalyzer
A common interface for all the single source longest path analyzers.- Since:
- Ptolemy II 4.0
- Version:
- $Id$
- Author:
- Shahrooz Shahparnia
- See Also:
SingleSourceLongestPathAnalysis
- Pt.AcceptedRating:
- Red (ssb)
- Pt.ProposedRating:
- Red (shahrooz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double[]
distance()
Return the distance from the start node to all the other nodes in the graph.Node
getStartNode()
Return the start node of this analyzer.java.util.List
path(Node endNode)
Return the longest path from node "startNode" to node "endNode" in the form of an ordered list.double
pathLength(Node endNode)
Return the length of the longest path from node "startNode" to node "endNode".void
setStartNode(Node startNode)
Set the single source node of this analyzer to the given node.-
Methods inherited from interface ptolemy.graph.analysis.analyzer.GraphAnalyzer
graph
-
-
-
-
Method Detail
-
distance
double[] distance()
Return the distance from the start node to all the other nodes in the graph. The result is a double[] indexed by the destination node label.- Returns:
- Return the distance from the start node to all the other nodes in the graph.
- See Also:
Graph.nodeLabel(ptolemy.graph.Node)
-
getStartNode
Node getStartNode()
Return the start node of this analyzer.- Returns:
- Return the start node of this analyzer.
- See Also:
setStartNode(Node)
-
path
java.util.List path(Node endNode)
Return the longest path from node "startNode" to node "endNode" in the form of an ordered list.- Parameters:
endNode
- The ending node of the path.- Returns:
- The longest path from startNode to endNode.
-
pathLength
double pathLength(Node endNode)
Return the length of the longest path from node "startNode" to node "endNode". The source node can be set usingsetStartNode(ptolemy.graph.Node)
.- Parameters:
endNode
- The ending node of the path.- Returns:
- The length of the longest path.
-
setStartNode
void setStartNode(Node startNode)
Set the single source node of this analyzer to the given node.- Parameters:
startNode
- The given node.- See Also:
getStartNode()
-
-