Package graph :: Module searching |

# Module searching

Search algorithms for python-graph.

Functions
tuple |
breadth_first_search(graph, root=None) Breadth-first search. |
tuple |
depth_first_search(graph, root=None) Depth-first search. |

Function Details

### breadth_first_search(graph, root=None) |
Breadth-first search. Parameters: `graph` (graph) - Graph. `root` (node) - Optional root node (will explore only root's connected component) Returns: tuple A tuple containing a dictionary and a list. Generated spanning tree Graph's level-based ordering

### depth_first_search(graph, root=None) |
Depth-first search. Parameters: `graph` (graph) - Graph. `root` (node) - Optional root node (will explore only root's connected component) Returns: tuple A tupple containing a dictionary and two lists: Generated spanning tree Graph's preordering Graph's postordering