-
Notifications
You must be signed in to change notification settings - Fork 206
Using Quickgraph
Marius Ungureanu edited this page Mar 15, 2019
·
5 revisions
- Add a reference to
QuickGraph.dllto your project. QuickGraph provides a version backward compatible with .Net 2.0 or a .Net 3.5 version. The only difference lies in the support for extension methods. - Most data structures are defined under the
QuickGraphnamespace, algorithms are under theQuickGraph.Algorithmsnamespace.
The vertex type can be any type as all QuickGraph data structure are generic. The edge type must implement the IEdge<TVertex> interface:
class FooVertex {} // custom vertex type
class FooEdge : Edge<FooVertex> []() // custom edge type
class FooGraph : AdjacencyGraph<FooVertex, FooEdge> {} // custom graph type- You can learn more about creating graphs, walking graphs or mutating graphs.