Bases: object
All methods from this module are static. It is not needed to create a Traversal object before calling the functions.
Iterate over edges in breadth-first search order starting from the given node(s).
graph (networkit.Graph) – The input graph.
start (int or list(int)) – Single node or list of nodes from where the BFS will start.
callback (function) – Takes four input parameters: (u, v, edgeweight, edgeid).
Iterate over nodes in breadth-first search order starting from the given node(s).
graph (networkit.Graph) – The input graph.
start (int or list(int)) – Single node or list of nodes from where the BFS will start.
callback (function) – Takes either one (node) or two (node, distance) input parameters.
Iterate over edges in depth-first search order starting from the given node(s).
graph (networkit.Graph) – The input graph.
start (int) – Source node from where the DFS will start.
callback (function) – Takes four input parameters: (u, v, edgeweight, edgeid).
Iterate over nodes in depth-first search order starting from the given node(s).
graph (networkit.Graph) – The input graph.
start (int) – Source node from where the DFS will start.
callback (function) – Takes a node as input parameter.
Iterate over nodes with Dijkstra search order starting from the given node(s).
graph (networkit.Graph) – The input graph.
start (int or list(int)) – Single node or list of nodes from where Dijkstra will start.
callback (function) – Takes either one (node) or two (node, distance) input parameters.