Package org.graph4j.shortestpath
Class DijkstraShortestPathDefault
java.lang.Object
org.graph4j.GraphAlgorithm
org.graph4j.shortestpath.DijkstraShortestPathBase
org.graph4j.shortestpath.DijkstraShortestPathDefault
- All Implemented Interfaces:
SingleSourceShortestPath
Implementation of Dijkstra's algorithm that iterates through the unsolved
vertices in order to select the optimal vertex at each step.
The complexity is of O(n^2), where n is the number of vertices.
Suitable for dense graphs.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.shortestpath.DijkstraShortestPathBase
before, cost, numSolved, size, solved, source, verticesFields inherited from class org.graph4j.GraphAlgorithm
directed, graph -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.graph4j.shortestpath.DijkstraShortestPathBase
compute, computePath, createPathEndingIn, findPath, getPathWeight, getPathWeights, getSource, postUpdate, preComputeMethods inherited from class org.graph4j.GraphAlgorithm
getGraphMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graph4j.shortestpath.SingleSourceShortestPath
getGraph
-
Constructor Details
-
DijkstraShortestPathDefault
-
-
Method Details
-
findMinIndex
protected int findMinIndex()- Specified by:
findMinIndexin classDijkstraShortestPathBase
-