Class AllSimplePaths

Inheritance Relationships

Base Type

Class Documentation

class AllSimplePaths : public NetworKit::Algorithm

Determines all the possible simple paths from a given source node to a target node of a directed unweighted graph. It also accepts a cutoff value i.e. the maximum length of paths.

Public Functions

AllSimplePaths(const Graph &G, node source, node target, count cutoff = none)

Creates the AllSimplePaths class for G, source s and target t.

Parameters:
  • G – The graph.

  • source – The source node.

  • target – The target node.

  • cutoff – The maximum length of the paths.

~AllSimplePaths() override = default
virtual void run() override

This method computes all possible paths from a given source node to a target node.

inline count numberOfSimplePaths()

This method returns the number of simple paths from the source node to the target node.

inline std::vector<std::vector<node>> getAllSimplePaths()
template<typename L>
void forAllSimplePaths(L handle)
template<typename L>
void parallelForAllSimplePaths(L handle)