I would like to know which classes and functions in Quickgraph library (C#) should I use, to find out, if there exists a connection between two arbitrary vertices in a directional graph?
I am a beginner at programming, especially programming alghorithms, so I would kindly ask you if you can provide me a sample code for mentioned problem, mainly because Quickgraph library doesn't have many problem-specific tutorials for beginners.ecially
Graph specification:
- Directed
- Not weighted (distance is not important, just connectivity between vertices/edges)
- Graph is dynamic so vertices/edges can be added/removed or edited.
Hm, I haven't tested it, but basic DFS/BFS should do the trick, as such:
That one checks if there is any connectivity from source to target. You might want to run that check vice versa too.