Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class EppsteinShortestPathIterator.EppsteinGraphPath
java.lang.Object
org.jgrapht.alg.shortestpath.EppsteinShortestPathIterator.EppsteinGraphPath
- All Implemented Interfaces:
Comparable<EppsteinShortestPathIterator<V,
,E>.EppsteinGraphPath> GraphPath<V,
E>
- Enclosing class:
EppsteinShortestPathIterator<V,
E>
private class EppsteinShortestPathIterator.EppsteinGraphPath
extends Object
implements GraphPath<V,E>, Comparable<EppsteinShortestPathIterator<V,E>.EppsteinGraphPath>
Represents a path that is generated during the computations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionShortest paths tree in the edge reversed graphgraph
rooted atsink
.The graph.private List
<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> Vertices of the paths graph this path corresponds to.private double
Weight of tha path. -
Constructor Summary
ConstructorsConstructorDescriptionEppsteinGraphPath
(Graph<V, E> graph, List<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> pathsGraphVertices, Map<V, Pair<Double, E>> distanceAndPredecessorMap, double weight) -
Method Summary
Modifier and TypeMethodDescriptionint
Given the implicit representation of the path betweensource
andsink
constructs the edge list of the path.Returns the end vertex in the path.getGraph()
Returns the graph over which this path is defined.private List
<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> getSidetracks
(List<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> vertices) Builds sequence of sidetracks in thegraph
this path corresponds to.Returns the start vertex in the path.double
Returns the weight assigned to the path.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.GraphPath
getLength, getVertexList
-
Field Details
-
graph
The graph. -
pathsGraphVertices
Vertices of the paths graph this path corresponds to. -
distanceAndPredecessorMap
Shortest paths tree in the edge reversed graphgraph
rooted atsink
. -
weight
private double weightWeight of tha path.
-
-
Constructor Details
-
EppsteinGraphPath
-
-
Method Details
-
getGraph
Description copied from interface:GraphPath
Returns the graph over which this path is defined. The path may also be valid with respect to other graphs. -
getStartVertex
Description copied from interface:GraphPath
Returns the start vertex in the path.- Specified by:
getStartVertex
in interfaceGraphPath<V,
E> - Returns:
- the start vertex
-
getEndVertex
Description copied from interface:GraphPath
Returns the end vertex in the path.- Specified by:
getEndVertex
in interfaceGraphPath<V,
E> - Returns:
- the end vertex
-
getWeight
public double getWeight()Description copied from interface:GraphPath
Returns the weight assigned to the path. Typically, this will be the sum of the weights of the edge list entries (as defined by the containing graph), but some path implementations may use other definitions. -
getEdgeList
Given the implicit representation of the path betweensource
andsink
constructs the edge list of the path.- Specified by:
getEdgeList
in interfaceGraphPath<V,
E> - Returns:
- edge list of the path
-
getSidetracks
private List<EppsteinShortestPathIterator<V,E>.PathsGraphVertex> getSidetracks(List<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> vertices) Builds sequence of sidetracks in thegraph
this path corresponds to.- Parameters:
vertices
- vertices of the paths graph- Returns:
- list of sidetracks
-
compareTo
- Specified by:
compareTo
in interfaceComparable<EppsteinShortestPathIterator<V,
E>.EppsteinGraphPath>
-