# Sunday, September 21, 2008

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 schema
var 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…

Sunday, September 21, 2008 1:23:25 AM (Pacific Daylight Time, UTC-07:00)
Mono's implementation of System.Core.dll may be used to help deploy QuickGraph 3.0 to .NET 2.0 runtime.

http://evain.net/blog/articles/2008/09/14/c-3-and-linq-on-net-2
Lex Y. Li
Sunday, September 21, 2008 3:18:14 AM (Pacific Daylight Time, UTC-07:00)
Thank you!
Great framework, great job, i'm using it a lot. At the moment i'm working on layout algorithm and graph layout control (in WPF).
If you are interested in, a could publish some code into your CodePlex project. (I've made some new Graph interfaces and classes too...)
Let me know in email if you are interested in this...
(sry, i'm not fluent in english :))
Sunday, September 21, 2008 8:08:19 AM (Pacific Daylight Time, UTC-07:00)
Hi Palesz, what about creating your own project? I'm not really confortable handling contribution in this graph layout area. Curious to see what you came up with. Thanks, Peli.
Friday, September 26, 2008 1:11:46 PM (Pacific Daylight Time, UTC-07:00)
Hi Peli,

Thanks for all the great work. Just wondering if you compared the performance against 2.0 version?

I am also slightly confused/worried if 2.0 support is really gone out of the window. Can't we target 2.0 and get the bits like linq bridge or similar it could still work on 2.0 equiped boxes too?
Heston
Sunday, September 28, 2008 7:49:55 AM (Pacific Daylight Time, UTC-07:00)
There should be no major performance change with respect to 2.0. In fact the only dependency to 3.0 is extension methods (which require an attribute from System.Core), the rest is plain old C# 2.0.
Comments are closed.