You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alexandre Rabérin edited this page May 12, 2020
·
1 revision
Using QuikGraph
Setting up your project
Add a package reference to QuikGraph to your project. (<PackageReference Include="QuikGraph" Version="X.Y.Z" />). Or if you're not in an environment supporting NuGet, simply add a reference to the QuikGraph.dll that fit your constraint target version.
Most data structures are defined under the QuikGraph namespace, and algorithms are under the QuikGraph.Algorithms namespace.
Identify the vertex and edge types
The vertex type can be any type as all QuikGraph data structure are generic. The edge type must implement the IEdge<TVertex> interface:
classFooVertex{}// Custom vertex typeclassFooEdge:Edge<FooVertex>{}// Custom edge typeclassFooGraph:AdjacencyGraph<FooVertex,FooEdge>{}// Custom graph type