Class Dijkstra

Inheritance Relationships

Base Type

Class Documentation

class Dijkstra : public NetworKit::SSSP

Dijkstra’s SSSP algorithm.

Public Functions

Dijkstra(const Graph &G, node source, bool storePaths = true, bool storeNodesSortedByDistance = false, node target = none)

Creates the Dijkstra class for G and the source node source.

Parameters:
  • G – The graph.

  • source – The source node.

  • storePaths – Paths are reconstructable and the number of paths is stored.

  • storeNodesSortedByDistance – Store a vector of nodes ordered in increasing distance from the source.

  • target – The target node.

virtual void run() override

Performs the Dijkstra SSSP algorithm on the graph given in the constructor.