public class ShortestPathDijkstraAlgorithm extends ShortestPathAlgorithm
| Constructor and Description |
|---|
ShortestPathDijkstraAlgorithm(WeightedGraph wgraph,
HeapNodeComparator comparator)
Creates an instance of ShortestPathDijkstraAlgorithm.
|
| Modifier and Type | Method and Description |
|---|---|
WeightedGraph |
shortestPath(Vertex from)
Determines the shortest path from a given vertex to all other vertices
that are in the same connected set as the given vertex in the weighted graph
using Dijkstra's algorithm.
|
public ShortestPathDijkstraAlgorithm(WeightedGraph wgraph, HeapNodeComparator comparator)
wgraph - The WeightedGraph where a shortest path spanning tree will be determined.comparator - The HeapNodeComparator to be used to compare priorities of objects in the fringe/heap.public WeightedGraph shortestPath(Vertex from)
shortestPath in class ShortestPathAlgorithmfrom - The Vertex from where we want to obtain the shortest path
to all other vertices.Copyright © 2019 JULIE Lab, Germany. All rights reserved.