All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NetworKit::AllSimplePaths Class Reference

Determines all the possible simple paths from a given source node to a target node of a directed unweighted graph. More...

#include <AllSimplePaths.h>

Public Member Functions

 AllSimplePaths (const Graph &G, node source, node target, count cutoff=none)
 Creates the AllSimplePaths class for G, source s and target t. More...
 
 ~AllSimplePaths ()=default
 
void run ()
 This method computes all possible paths from a given source node to a target node. More...
 
count numberOfSimplePaths ()
 This method returns the number of simple paths from the source node to the target node. More...
 
std::vector< std::vector< node > > getAllSimplePaths ()
 
template<typename L >
void forAllSimplePaths (L handle)
 
template<typename L >
void parallelForAllSimplePaths (L handle)
 

Protected Member Functions

void computePaths ()
 
std::vector< node > * getAvailableSources (node s, count pathLength=0)
 

Protected Attributes

const GraphG
 
node source
 
node target
 
count cutoff
 
std::vector< countdistanceToTarget
 
std::vector< countdistanceFromSource
 
std::vector< std::vector< node > > paths
 
bool hasRun = false
 

Detailed Description

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.

Constructor & Destructor Documentation

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

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

Parameters
GThe graph.
sourceThe source node.
targetThe target node.
cutoffThe maximum length of the paths.
NetworKit::AllSimplePaths::~AllSimplePaths ( )
default

Member Function Documentation

void NetworKit::AllSimplePaths::computePaths ( )
protected
template<typename L >
void NetworKit::AllSimplePaths::forAllSimplePaths ( handle)
std::vector< std::vector< node > > NetworKit::AllSimplePaths::getAllSimplePaths ( )
inline
std::vector< node > * NetworKit::AllSimplePaths::getAvailableSources ( node  s,
count  pathLength = 0 
)
protected
count NetworKit::AllSimplePaths::numberOfSimplePaths ( )
inline

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

template<typename L >
void NetworKit::AllSimplePaths::parallelForAllSimplePaths ( handle)
void NetworKit::AllSimplePaths::run ( )

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

Member Data Documentation

count NetworKit::AllSimplePaths::cutoff
protected
std::vector<count> NetworKit::AllSimplePaths::distanceFromSource
protected
std::vector<count> NetworKit::AllSimplePaths::distanceToTarget
protected
const Graph& NetworKit::AllSimplePaths::G
protected
bool NetworKit::AllSimplePaths::hasRun = false
protected
std::vector<std::vector<node> > NetworKit::AllSimplePaths::paths
protected
node NetworKit::AllSimplePaths::source
protected
node NetworKit::AllSimplePaths::target
protected

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