Generic Graph Data Structures and Algorithms for .NET
Sandwych.QuickGraph is a port of the original QuickGraph project to .NET Standard 1.6+.
QuickGraph provides generic directed/undirected graph datastructures and algorithms for .NET. QuickGraph comes with algorithms such as depth first seach, breath first search, A* search, shortest path, k-shortest path, maximum flow, minimum spanning tree, least common ancestors, etc... QuickGraph supports MSAGL, GLEE, and Graphviz to render the graphs, serialization to GraphML, etc...
QuickGraph is a portable library, i.e. supports .Net 4.0, Silverlight 4.0, Windows Phone 7, XBox 360 and Windows 8 Metro apps. QuickGraph is annotated with Code Contracts.
Other projects using QuickGraph:
PM> Install-Package Sandwych.QuickGraph.Core
This example takes a DataSet, builds the graph of table and constraints from the schema and computes the table topological sort (useful to figure order to populate a database):
DataSet ds = new MyDataSet(); // your dataset
var graph = ds.ToGraph(); // wraps the dataset into a DataSetGraph
foreach(DataTable table in graph.TopologicalSort()) // applies a topological sort to the dataset graph
Console.WriteLine(table.TableName); // in which order should we delete the tables?
Sandwych.QuickGraph is licensed to the MS-PL License. More details please see the LICENSE.md
file.
The design of QuickGraph is inspired from the Boost Graph Library.