Class IntVertexDijkstraShortestPath.ArrayBasedSingleSourcePathsImpl
java.lang.Object
org.jgrapht.alg.shortestpath.IntVertexDijkstraShortestPath.ArrayBasedSingleSourcePathsImpl
- All Implemented Interfaces:
Serializable, ShortestPathAlgorithm.SingleSourcePaths<Integer,E>
- Enclosing class:
IntVertexDijkstraShortestPath<E>
private class IntVertexDijkstraShortestPath.ArrayBasedSingleSourcePathsImpl
extends Object
implements ShortestPathAlgorithm.SingleSourcePaths<Integer,E>, Serializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[]private IntVertexDijkstraShortestPath<E>.IdentifierMapprivate E[]private static final longprivate Integer -
Constructor Summary
ConstructorsConstructorDescriptionArrayBasedSingleSourcePathsImpl(Integer source, double[] dist, E[] pred, IntVertexDijkstraShortestPath<E>.IdentifierMap idMap) -
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
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
source
-
dist
private double[] dist -
pred
-
idMap
-
-
Constructor Details
-
ArrayBasedSingleSourcePathsImpl
public ArrayBasedSingleSourcePathsImpl(Integer source, double[] dist, E[] pred, IntVertexDijkstraShortestPath<E>.IdentifierMap idMap)
-
-
Method Details
-
getGraph
Description copied from interface:ShortestPathAlgorithm.SingleSourcePathsReturns the graph over which this set of paths is defined.- Specified by:
getGraphin interfaceShortestPathAlgorithm.SingleSourcePaths<Integer,E> - Returns:
- the graph
-
getSourceVertex
Description copied from interface:ShortestPathAlgorithm.SingleSourcePathsReturns the single source vertex.- Specified by:
getSourceVertexin interfaceShortestPathAlgorithm.SingleSourcePaths<Integer,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<Integer,E> - Parameters:
targetVertex- 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<Integer,E> - Parameters:
targetVertex- the sink vertex- Returns:
- the path from the source vertex to the sink vertex or null if no such path exists
-