java.lang.Object
lv.id.jc.algorithm.graph.DijkstrasAlgorithm<T>
- Type Parameters:
T- the type of vertex
- All Implemented Interfaces:
SearchAlgorithm<T>
Algorithm for finding the fastest paths between nodes in a graph.
The algorithm uses information about edge's distance to find the fastest path.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DijkstrasAlgorithm
public DijkstrasAlgorithm()
-
-
Method Details
-
findPath
Description copied from interface:SearchAlgorithmFind the path from the source node to the target- Specified by:
findPathin interfaceSearchAlgorithm<T>- Parameters:
graph- The graph in which we search for the pathsource- Search starting point identifiertarget- Search finish point identifier- Returns:
- Path found or empty list if path cannot be found
-