edgegraph.traversal.breadthfirst.bft

Contents

edgegraph.traversal.breadthfirst.bft#

edgegraph.traversal.breadthfirst.bft(uni, start)#

Perform a breadth-first traversal.

This function performs a breadth-first traversal within uni, starting at start, and returns the vertices visited in a list.

This algorithm is detailed in pseudocode in [CLRS09], figure 22.3, and [GoTa60], Algorithm 13.8.

Parameters:
  • uni (Universe) – The universe to search in.

  • start (Vertex) – The vertex to start searching at.

Returns:

The vertices visited during traversal.

Return type:

list[Vertex]