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 graphgraphrooted atsink.The graph.private List<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> Vertices of the paths graph this path corresponds to.private doubleWeight 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 TypeMethodDescriptionintGiven the implicit representation of the path betweensourceandsinkconstructs 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 thegraphthis path corresponds to.Returns the start vertex in the path.doubleReturns the weight assigned to the path.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GraphPath
getLength, getVertexList
-
Field Details
-
graph
-
pathsGraphVertices
Vertices of the paths graph this path corresponds to. -
distanceAndPredecessorMap
-
weight
private double weightWeight of tha path.
-
-
Constructor Details
-
EppsteinGraphPath
-
-
Method Details
-
getGraph
-
getStartVertex
-
getEndVertex
-
getWeight
public double getWeight()Description copied from interface:GraphPathReturns 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
-
getSidetracks
private List<EppsteinShortestPathIterator<V,E>.PathsGraphVertex> getSidetracks(List<EppsteinShortestPathIterator<V, E>.PathsGraphVertex> vertices) Builds sequence of sidetracks in thegraphthis path corresponds to.- Parameters:
vertices- vertices of the paths graph- Returns:
- list of sidetracks
-
compareTo
- Specified by:
compareToin interfaceComparable<EppsteinShortestPathIterator<V,E>.EppsteinGraphPath>
-