I’ve upgraded QuickGraph to C# 3.0, and it’s extension methods and lambdas (requires .net 3.5). The result is fairly nice, specially the extension methods who make algorithms more discoverable.
For example, the following snippet shows how to get the topological sort of tables out of a DataSet (useful when you need to fill/delete tables):
DateSet ds = …; // get some DataSet// ToGraph() is an extension method on DataSet, which builds // the Table/Relation graph from the data set schemavar g = ds.ToGraph(); // TopologicalSort() is an extension method on IVertexAndEdgeListGraph<T,E>// which returns the graph topological sort var tables = g.TopologicalSort(); foreach(DataTable table in tables) Console.WriteLine(table.TableName);
More changes were made on the API to take advantage of delegates (i.e. since it’s easier to write them): no more predicate interfaces, dropping dictionaries for delegates in shortest path algorithm etc…
Page rendered at Thursday, December 04, 2008 6:07:36 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.