Bases: Algorithm
Algorithm to compute all existing simple paths from a source node to a target node. The maximum length of the paths can be fixed through ‘cutoff’.
Note
CAUTION: This algorithm could take a lot of time on large networks (many edges), especially if the cutoff value is high or not specified.
G (networkit.Graph) – The input graph.
source (int) – The source node.
target (int) – The target node.
cutoff (int, optional) – The maximum length of the simple paths. Default: None
More efficient path iterator. Iterates over all the simple paths.
callback (object) – Any callable object that takes the parameter path
Returns all the simple paths from source to target.
A list containing all simple paths (each represented by a list of nodes).
list(list(int))
Returns the number of simple paths.
The number of simple paths.
int
Bases: Algorithm
Determines or estimates the number of reachable nodes from each node in the graph.
G (networkit.Graph) – The input graph.
exact (bool) – Whether or not to compute the number of reachable nodes exactly. Only used for directed graphs, on undirected graphs the number of reachable nodes from every node can be computed in linear time.
Returns the number of reachable nodes from the given node ‘u’. Only available if ‘exact’ is true.
u (int) – A node.
The number of nodes reachable from ‘u’.
int
Returns a lower bound of the number of reachable nodes from the given node ‘u’.
u (int) – A node.
Lower bound of number of nodes reachable from ‘u’.
int
Returns an upper bound of the number of reachable nodes from the given node ‘u’.
u (int) – A node.
Upper bound of number of nodes reachable from ‘u’.
int