edgegraph.traversal.breadthfirst.bfs#
- edgegraph.traversal.breadthfirst.bfs(uni, start, attrib, val)#
Perform a breadth-first search.
This function performs a breadth-first search within
uni, starting atstart, looking for a vertex such thatvert[attrib] == val.This algorithm is detailed in pseudocode in [CLRS09], figure 22.3, and [GoTa60], Algorithm 13.8. Slight modifications have been made to break early when the desired value is found.
- Parameters:
- Returns:
The vertex which first matched the specified attribute value.
- Return type: