T - is the type of nodepublic class DijkstraShortestPath<T extends Node> extends Object
For this matter, distTo is an array of arrays whose first index is s.
I have based my algorithm on Algorithms, 4e, Sedgewick and Wayne, plus notes from other lectures.
| Constructor and Description |
|---|
DijkstraShortestPath(DirectedGraph<T> graph)
Construct AND compute the shortest paths for a given graph.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
compute(int s) |
double[][] |
getDistances() |
double[][] |
getDistTo() |
Transition[][] |
getEdgeTo() |
double |
getMaxDist() |
Node[][] |
getPred() |
static void |
main(String[] args) |
protected void |
relax(int s,
me.jaimegarza.syntax.graph.DijkstraShortestPath.PQ elem) |
String |
toString() |
public DijkstraShortestPath(DirectedGraph<T> graph)
graph - is the graph in questionpublic double[][] getDistances()
protected void compute(int s)
protected void relax(int s,
me.jaimegarza.syntax.graph.DijkstraShortestPath.PQ elem)
public static void main(String[] args)
public double[][] getDistTo()
public Transition[][] getEdgeTo()
public Node[][] getPred()
public double getMaxDist()
Copyright © 2017. All rights reserved.