Class ReverseBFS

Inheritance Relationships

Base Type

Class Documentation

class ReverseBFS : public NetworKit::SSSP

The ReverseBFS class is used to do a reverse breadth-first search (following the incoming edges of a node) on a Graph from a given source node.

Public Functions

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

Constructs the ReverseBFS class for G and source node source.

Parameters:
  • G – The graph.

  • source – The source node of the breadth-first search.

  • storePaths – store paths and number of paths?

  • storeStack – maintain a stack of nodes in decreasing order of distance

virtual void run() override

Reverse Breadth-first search from source.

Returns:

Vector of unweighted distances from node source, i.e. the length (number of edges) of the shortest path from source to any other node.