views:

182

answers:

2

I am interested in finding a path (not necessarily shortest) in a short amount of time. Dijsktra and AStar in networkx is taking too long.

Why is there no DFS or BFS in networkx?

I plan to write my own DFS and BFS search (I am leaning more towards BFS because my graph is pretty deep). Is there anything that I can use in networkx's lib to speed me up?

+2  A: 

The Traversal module has multiple depth-first-search variations. Breadth-first-search is implemented in the connected components functions, also in that module. Either use that, or if you need custom behaviour, re-implement your own using that as the example.

ire_and_curses