mocgraph.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.

Version:
$Id: SingleSourceLongestPathAnalyzer.java,v 1.1 2007/04/07 13:58:18 ssb Exp $
Author:
Shahrooz Shahparnia
See Also:
graph.analysis.SingleSourceLongestPathAnalysis

Method Summary
 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 mocgraph.analysis.analyzer.GraphAnalyzer
graph
 
Methods inherited from interface mocgraph.analysis.analyzer.Analyzer
toString, valid
 

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.Graph#nodeLabel

getStartNode

Node getStartNode()
Return the start node of this analyzer.

Returns:
Return the start node of this analyzer.

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.

pathLength

double pathLength(Node endNode)
Return the length of the longest path from node "startNode" to node "endNode". The source node can be set using setStartNode(mocgraph.Node).

Parameters:
endNode - The ending node of the path.

setStartNode

void setStartNode(Node startNode)
Set the single source node of this analyzer to the given node.

Parameters:
startNode - The given node.