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>
cameFrom
Predecessor map.(package private) java.util.Set<V>
closedList
Closed nodes of the frontier.(package private) V
endVertex
End vertex of the frontier.(package private) java.util.Map<V,java.lang.Double>
gScoreMap
Tentative distance to the vertices in tha graph computed so far.(package private) AStarAdmissibleHeuristic<V>
heuristic
Heuristic used in this frontier.(package private) org.jheaps.AddressableHeap<java.lang.Double,V>
openList
Open 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) double
getDistance(V v)
Returns distance to vertexv
computed so far.(package private) E
getTreeEdge(V v)
Returns edge which connectsv
to its predecessor in the shortest paths tree of this frontier.(package private) void
updateDistance(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.BaseSearchFrontier
Returns distance to vertexv
computed so far.- Specified by:
getDistance
in classBaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E>
- Parameters:
v
- vertex- Returns:
- distance to
v
-
getTreeEdge
E getTreeEdge(V v)
Description copied from class:BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier
Returns edge which connectsv
to its predecessor in the shortest paths tree of this frontier.- Specified by:
getTreeEdge
in classBaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E>
- Parameters:
v
- vertex- Returns:
- edge in shortest paths tree
-
-