Package graphs
Class DijkstraSolver<V>
- java.lang.Object
- 
- graphs.DijkstraSolver<V>
 
- 
- Type Parameters:
- V- the type of vertices.
 - All Implemented Interfaces:
- ShortestPathSolver<V>
 
 public class DijkstraSolver<V> extends Object implements ShortestPathSolver<V> Dijkstra's algorithm implementation of theShortestPathSolverinterface.- See Also:
- ShortestPathSolver
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface graphs.ShortestPathSolverShortestPathSolver.Constructor<V>
 
- 
 - 
Constructor SummaryConstructors Constructor Description DijkstraSolver(Graph<V> graph, V start)Constructs a new instance by executing Dijkstra's algorithm on the graph from the start.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description List<V>solution(V goal)Returns the single-pair shortest path from a start defined inConstructor#run(Graph, V)to the goal.
 
- 
- 
- 
Method Detail- 
solutionpublic List<V> solution(V goal) Description copied from interface:ShortestPathSolverReturns the single-pair shortest path from a start defined inConstructor#run(Graph, V)to the goal.- Specified by:
- solutionin interface- ShortestPathSolver<V>
- Parameters:
- goal- the goal vertex.
- Returns:
- a list of vertices representing the shortest path.
 
 
- 
 
-