Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class BidirectionalAStarShortestPath.AStarSearchFrontier
- java.lang.Object
-
- org.jgrapht.alg.shortestpath.BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E>
-
- org.jgrapht.alg.shortestpath.BidirectionalAStarShortestPath.AStarSearchFrontier
-
- Enclosing class:
- BidirectionalAStarShortestPath<V,E>
class BidirectionalAStarShortestPath.AStarSearchFrontier extends BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E>
Maintains search frontier during shortest path computation.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<V,E>cameFromPredecessor map.(package private) java.util.Set<V>closedListClosed nodes of the frontier.(package private) VendVertexEnd vertex of the frontier.(package private) java.util.Map<V,java.lang.Double>gScoreMapTentative distance to the vertices in tha graph computed so far.(package private) AStarAdmissibleHeuristic<V>heuristicHeuristic used in this frontier.(package private) org.jheaps.AddressableHeap<java.lang.Double,V>openListOpen nodes of the frontier.(package private) java.util.Map<V,org.jheaps.AddressableHeap.Handle<java.lang.Double,V>>vertexToHeapNodeMap-
Fields inherited from class org.jgrapht.alg.shortestpath.BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier
graph
-
-
Constructor Summary
Constructors Constructor Description AStarSearchFrontier(Graph<V,E> graph, V endVertex, AStarAdmissibleHeuristic<V> heuristic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) doublegetDistance(V v)Returns distance to vertexvcomputed so far.(package private) EgetTreeEdge(V v)Returns edge which connectsvto its predecessor in the shortest paths tree of this frontier.(package private) voidupdateDistance(V v, E e, double tentativeGScore, double fScore)
-
-
-
Field Detail
-
endVertex
final V endVertex
End vertex of the frontier.
-
heuristic
final AStarAdmissibleHeuristic<V> heuristic
Heuristic used in this frontier.
-
openList
final org.jheaps.AddressableHeap<java.lang.Double,V> openList
Open nodes of the frontier.
-
vertexToHeapNodeMap
final java.util.Map<V,org.jheaps.AddressableHeap.Handle<java.lang.Double,V>> vertexToHeapNodeMap
-
closedList
final java.util.Set<V> closedList
Closed nodes of the frontier.
-
gScoreMap
final java.util.Map<V,java.lang.Double> gScoreMap
Tentative distance to the vertices in tha graph computed so far.
-
-
Method Detail
-
getDistance
double getDistance(V v)
Description copied from class:BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontierReturns distance to vertexvcomputed so far.- Specified by:
getDistancein classBaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E>- Parameters:
v- vertex- Returns:
- distance to
v
-
getTreeEdge
E getTreeEdge(V v)
Description copied from class:BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontierReturns edge which connectsvto its predecessor in the shortest paths tree of this frontier.- Specified by:
getTreeEdgein classBaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E>- Parameters:
v- vertex- Returns:
- edge in shortest paths tree
-
-