Skip to content

Commit

Permalink
Fix BFS Docstring (rapidsai#2318)
Browse files Browse the repository at this point in the history
Corrects the BFS docstring by clarifying that multiple start vertices are accepted as long as they are from different components, and that passing start vertices from the same component will result in undefined behavior.

Authors:
  - Alex Barghi (https://github.com/alexbarghi-nv)
  - Chuck Hastings (https://github.com/ChuckHastings)

Approvers:
  - https://github.com/betochimas
  - Joseph Nke (https://github.com/jnke2016)
  - Brad Rees (https://github.com/BradReesWork)

URL: rapidsai#2318
  • Loading branch information
alexbarghi-nv authored Jun 1, 2022
1 parent 008273b commit 0e03109
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions python/cugraph/cugraph/dask/traversal/bfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ def bfs(input_graph,
----------
input_graph : cugraph.Graph
cuGraph graph instance, should contain the connectivity information
as dask cudf edge list dataframe(edge weights are not used for this
as dask cudf edge list dataframe (edge weights are not used for this
algorithm).
start : Integer
Specify starting vertex for breadth-first search; this function
iterates over edges in the component reachable from this node.
start : Integer or list
The id of the graph vertex from which the traversal begins, or
if a list, the vertex from which the traversal begins in each
component of the graph. Only one vertex per connected
component of the graph is allowed.
depth_limit : Integer or None, optional (default=None)
Limit the depth of the search
Expand Down
7 changes: 5 additions & 2 deletions python/cugraph/cugraph/traversal/bfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ def bfs(G,
information. Edge weights, if present, should be single or double
precision floating point values.
start : Integer, optional (default=None)
The index of the graph vertex from which the traversal begins
start : Integer or list, optional (default=None)
The id of the graph vertex from which the traversal begins, or
if a list, the vertex from which the traversal begins in each
component of the graph. Only one vertex per connected
component of the graph is allowed.
depth_limit : Integer or None, optional (default=None)
Limit the depth of the search
Expand Down

0 comments on commit 0e03109

Please sign in to comment.