Package graphs.shortestpaths
Class AStarSolver<V>
- java.lang.Object
-
- graphs.shortestpaths.AStarSolver<V>
-
- Type Parameters:
V
- the type of vertices.
public class AStarSolver<V> extends Object
A* search implementation for single-pair shortest paths in anAStarGraph
.- See Also:
AStarGraph
-
-
Constructor Summary
Constructors Constructor Description AStarSolver(AStarGraph<V> graph, V start, V goal)
Constructs a new instance by executing A* search on the graph from the start to the goal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<V>
solution()
Returns the single-pair shortest path from the stored start to the stored goal.
-
-
-
Constructor Detail
-
AStarSolver
public AStarSolver(AStarGraph<V> graph, V start, V goal)
Constructs a new instance by executing A* search on the graph from the start to the goal.- Parameters:
graph
- the input graph.start
- the start vertex.goal
- the goal vertex.
-
-