graph icon indicating copy to clipboard operation
graph copied to clipboard

Confusing function signature of dfs, bfs searches

Open TonyXiang8787 opened this issue 3 years ago • 1 comments

In the documentation of (for example) depth first search. The signature of the named parameter version requires a lvalue mutable reference graph.

// named parameter version
template <class Graph, class class P, class T, class R>
void depth_first_search(Graph& G,
  const bgl_named_params<P, T, R>& params);

Also in the documentation below it requires a non-const lvalue. However, if I read the actual code signature, it is acutally const Graph&. This is confusing. The same confusion also appears in the documentation of undirected_dfs, breath first search, and the dfs/bfs visit.

TonyXiang8787 avatar Mar 09 '21 07:03 TonyXiang8787

Can you open a pull request to fix it?

jeremy-murphy avatar Oct 14 '22 05:10 jeremy-murphy