Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class EppsteinShortestPathIterator.EppsteinGraphPath
- java.lang.Object
-
- org.jgrapht.alg.shortestpath.EppsteinShortestPathIterator.EppsteinGraphPath
-
- All Implemented Interfaces:
java.lang.Comparable<EppsteinShortestPathIterator.EppsteinGraphPath>,GraphPath<V,E>
- Enclosing class:
- EppsteinShortestPathIterator<V,E>
private class EppsteinShortestPathIterator.EppsteinGraphPath extends java.lang.Object implements GraphPath<V,E>, java.lang.Comparable<EppsteinShortestPathIterator.EppsteinGraphPath>
Represents a path that is generated during the computations.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<V,Pair<java.lang.Double,E>>distanceAndPredecessorMapShortest paths tree in the edge reversed graphgraphrooted atsink.private Graph<V,E>graphThe graph.private java.util.List<EppsteinShortestPathIterator.PathsGraphVertex>pathsGraphVerticesVertices of the paths graph this path corresponds to.private doubleweightWeight of tha path.
-
Constructor Summary
Constructors Constructor Description EppsteinGraphPath(Graph<V,E> graph, java.util.List<EppsteinShortestPathIterator.PathsGraphVertex> pathsGraphVertices, java.util.Map<V,Pair<java.lang.Double,E>> distanceAndPredecessorMap, double weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(EppsteinShortestPathIterator.EppsteinGraphPath o)java.util.List<E>getEdgeList()Given the implicit representation of the path betweensourceandsinkconstructs the edge list of the path.VgetEndVertex()Returns the end vertex in the path.Graph<V,E>getGraph()Returns the graph over which this path is defined.private java.util.List<EppsteinShortestPathIterator.PathsGraphVertex>getSidetracks(java.util.List<EppsteinShortestPathIterator.PathsGraphVertex> vertices)Builds sequence of sidetracks in thegraphthis path corresponds to.VgetStartVertex()Returns the start vertex in the path.doublegetWeight()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 Detail
-
pathsGraphVertices
private java.util.List<EppsteinShortestPathIterator.PathsGraphVertex> pathsGraphVertices
Vertices of the paths graph this path corresponds to.
-
distanceAndPredecessorMap
private java.util.Map<V,Pair<java.lang.Double,E>> distanceAndPredecessorMap
Shortest paths tree in the edge reversed graphgraphrooted atsink.
-
weight
private double weight
Weight of tha path.
-
-
Method Detail
-
getGraph
public Graph<V,E> getGraph()
Description copied from interface:GraphPathReturns the graph over which this path is defined. The path may also be valid with respect to other graphs.
-
getStartVertex
public V getStartVertex()
Description copied from interface:GraphPathReturns the start vertex in the path.- Specified by:
getStartVertexin interfaceGraphPath<V,E>- Returns:
- the start vertex
-
getEndVertex
public V getEndVertex()
Description copied from interface:GraphPathReturns the end vertex in the path.- Specified by:
getEndVertexin interfaceGraphPath<V,E>- Returns:
- the end vertex
-
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
public java.util.List<E> getEdgeList()
Given the implicit representation of the path betweensourceandsinkconstructs the edge list of the path.- Specified by:
getEdgeListin interfaceGraphPath<V,E>- Returns:
- edge list of the path
-
getSidetracks
private java.util.List<EppsteinShortestPathIterator.PathsGraphVertex> getSidetracks(java.util.List<EppsteinShortestPathIterator.PathsGraphVertex> vertices)
Builds sequence of sidetracks in thegraphthis path corresponds to.- Parameters:
vertices- vertices of the paths graph- Returns:
- list of sidetracks
-
compareTo
public int compareTo(EppsteinShortestPathIterator.EppsteinGraphPath o)
- Specified by:
compareToin interfacejava.lang.Comparable<EppsteinShortestPathIterator.EppsteinGraphPath>
-
-