Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class FloydWarshallShortestPaths.FloydWarshallSingleSourcePaths
java.lang.Object
org.jgrapht.alg.shortestpath.FloydWarshallShortestPaths.FloydWarshallSingleSourcePaths
- All Implemented Interfaces:
ShortestPathAlgorithm.SingleSourcePaths<V,E>
- Enclosing class:
FloydWarshallShortestPaths<V,E>
class FloydWarshallShortestPaths.FloydWarshallSingleSourcePaths
extends Object
implements ShortestPathAlgorithm.SingleSourcePaths<V,E>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGraph()Returns the graph over which this set of paths is defined.Return the path from the source vertex to the sink vertex.Returns the single source vertex.doubleReturn the weight of the path from the source vertex to the sink vertex.
-
Field Details
-
source
-
-
Constructor Details
-
FloydWarshallSingleSourcePaths
-
-
Method Details
-
getGraph
Description copied from interface:ShortestPathAlgorithm.SingleSourcePathsReturns the graph over which this set of paths is defined.- Specified by:
getGraphin interfaceShortestPathAlgorithm.SingleSourcePaths<V,E> - Returns:
- the graph
-
getSourceVertex
Description copied from interface:ShortestPathAlgorithm.SingleSourcePathsReturns the single source vertex.- Specified by:
getSourceVertexin interfaceShortestPathAlgorithm.SingleSourcePaths<V,E> - Returns:
- the single source vertex
-
getWeight
Description copied from interface:ShortestPathAlgorithm.SingleSourcePathsReturn the weight of the path from the source vertex to the sink vertex. If no such path exists,Double.POSITIVE_INFINITYis returned. The weight of the path between a vertex and itself is always zero.- Specified by:
getWeightin interfaceShortestPathAlgorithm.SingleSourcePaths<V,E> - Parameters:
sink- the sink vertex- Returns:
- the weight of the path between source and sink vertices or
Double.POSITIVE_INFINITYin case no such path exists
-
getPath
Description copied from interface:ShortestPathAlgorithm.SingleSourcePathsReturn the path from the source vertex to the sink vertex.- Specified by:
getPathin interfaceShortestPathAlgorithm.SingleSourcePaths<V,E> - Parameters:
sink- the sink vertex- Returns:
- the path from the source vertex to the sink vertex or null if no such path exists
-