Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::Dijkstra< T, H > Class Template Reference

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...
 

Detailed Description

template<typename T, template< typename P, class C > class H = PairingHeap>
class ogdf::Dijkstra< T, H >

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.

Member Function Documentation

◆ call() [1/2]

template<typename T, template< typename P, class C > class H = PairingHeap>
void ogdf::Dijkstra< T, H >::call ( const Graph &  G,
const EdgeArray< T > &  weight,
const List< node > &  sources,
NodeArray< edge > &  predecessor,
NodeArray< T > &  distance,
bool  directed = false 
)
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.

Parameters
GThe original input graph
weightThe edge weights
sourcesA list of source nodes
predecessorThe resulting predecessor relation
distanceThe resulting distances to all other nodes
directedTrue iff G should be interpreted as directed graph

Definition at line 61 of file Dijkstra.h.

◆ call() [2/2]

template<typename T, template< typename P, class C > class H = PairingHeap>
void ogdf::Dijkstra< T, H >::call ( const Graph &  G,
const EdgeArray< T > &  weight,
node  s,
NodeArray< edge > &  predecessor,
NodeArray< T > &  distance,
bool  directed = false 
)
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.

Parameters
GThe original input graph
weightThe edge weights
sThe source node
predecessorThe resulting predecessor relation
distanceThe resulting distances to all other nodes
directedTrue iff G should be interpreted as directed graph

Definition at line 112 of file Dijkstra.h.

Member Data Documentation

◆ m_eps

template<typename T, template< typename P, class C > class H = PairingHeap>
EpsilonTest ogdf::Dijkstra< T, H >::m_eps
protected

For floating point comparisons (if floating point is used)

Definition at line 54 of file Dijkstra.h.


The documentation for this class was generated from the following file: