Description
AStarGraph.java
package astar;
import java.util.List;
/** Represents a graph of vertices. */
public interface AStarGraph {
/** Returns the list of outgoing edges from the given vertex. */
List> neighbors(Vertex v);
/**
* Returns an estimated distance from vertex s to the goal vertex
according to
*
the A* heuristic function for this graph.
*/
double estimatedDistanceToGoal(Vertex s, Vertex goal);
}
AStarSolver.java
package astar;
import java.util.List;
/**
* @see ShortestPathsSolver for more method documentation
*/
public class AStarSolver implements ShortestPathsSolver {
// TODO: add fields as necessary
/**
* Immediately solves and stores the result of running memory optimized
A*
* search, computing everything necessary for all other methods to return
* their results in constant time. The timeout is given in seconds.
*/
public AStarSolver(AStarGraph input, Vertex start, Vertex end,
double timeout) {
// TODO: replace this with your code
throw new UnsupportedOperationException("Not implemented yet;
replace this with your code.");