Class DynSSSP

Inheritance Relationships

Base Types

Derived Types

Class Documentation

class DynSSSP : public NetworKit::SSSP, public NetworKit::DynAlgorithm

Interface for dynamic single-source shortest path algorithms.

Subclassed by NetworKit::DynBFS, NetworKit::DynDijkstra

Public Functions

DynSSSP(const Graph &G, node source, bool storePredecessors = true, node target = none)

The algorithm computes a dynamic SSSP starting from the specified source vertex.

Parameters:
  • graph – input graph.

  • source – source vertex.

  • storePredecessors – keep track of the lists of predecessors?

~DynSSSP() override = default
inline bool modified()

Returns true or false depending on whether the node previoulsy specified with setTargetNode has been modified by the udate or not.

Parameters:

batch – The batch of edge insertions.

inline void setTargetNode(node t = 0)

Set a target node to be observed during the update. If a node t is set as target before the update, the function modified() will return true or false depending on whether node t has been modified by the update.

Parameters:

t – Node to be observed.

inline const std::vector<node> &getPredecessors(node t) const

Returns the predecessor nodes of t on all shortest paths from source to t.

Parameters:

t – Target node.

Returns:

The predecessors of t on all shortest paths from source to t.

Protected Attributes

bool storePreds = true
bool mod = false
node target