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
-
Method Summary
-
Constructor Details
-
DijkstrasAlgorithm
public DijkstrasAlgorithm()
-
-
Method Details
-
findPath
Description copied from interface:SearchAlgorithm
Find the path from the source node to the target- Specified by:
findPath
in 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
-