Dijkstra's single source shortest path algorithm. More...
#include <ogdf/graphalg/Dijkstra.h>
Public Member Functions | |
| void | call (const Graph &G, const EdgeArray< T > &weight, const List< node > &sources, NodeArray< edge > &predecessor, NodeArray< T > &distance, bool directed=false) |
| Calculates, based on the graph G with corresponding edge costs and source nodes, the shortest paths and distances to all other nodes by Dijkstra's algorithm. More... | |
| void | call (const Graph &G, const EdgeArray< T > &weight, node s, NodeArray< edge > &predecessor, NodeArray< T > &distance, bool directed=false) |
| Calculates, based on the graph G with corresponding edge costs and a source node s, the shortest paths and distances to all other nodes by Dijkstra's algorithm. More... | |
Protected Attributes | |
| EpsilonTest | m_eps |
| For floating point comparisons (if floating point is used) More... | |
Dijkstra's single source shortest path algorithm.
This class implements Dijkstra's algorithm for computing single source shortest path in (undirected or directed) graphs with proper, positive edge weights. It returns a predecessor array as well as the shortest distances from the source node to all others.
Definition at line 52 of file Dijkstra.h.
|
inline |
Calculates, based on the graph G with corresponding edge costs and source nodes, the shortest paths and distances to all other nodes by Dijkstra's algorithm.
| G | The original input graph |
| weight | The edge weights |
| sources | A list of source nodes |
| predecessor | The resulting predecessor relation |
| distance | The resulting distances to all other nodes |
| directed | True iff G should be interpreted as directed graph |
Definition at line 61 of file Dijkstra.h.
|
inline |
Calculates, based on the graph G with corresponding edge costs and a source node s, the shortest paths and distances to all other nodes by Dijkstra's algorithm.
| G | The original input graph |
| weight | The edge weights |
| s | The source node |
| predecessor | The resulting predecessor relation |
| distance | The resulting distances to all other nodes |
| directed | True iff G should be interpreted as directed graph |
Definition at line 112 of file Dijkstra.h.
|
protected |
For floating point comparisons (if floating point is used)
Definition at line 54 of file Dijkstra.h.