Bootstrapping and C# wrapper for SNAP questions

Sep 25, 2010 at 5:06 AM

Real excited here about NodeXL; and I have two questions about getting started...

If NodeXL is an Exel "visage" of SNAP then how do I learn to do SNAP-like things in Excel? A simple example: Given a graph G I'd like to calculate a new graph (say its dual or G x G)

Related: Is there a .NET / C# wrapper deal so I can work with SNAP without C++?  I'm just spoiled rotten by C# and lazy to boot.

Thanks y'all

Sep 25, 2010 at 6:39 AM
Edited Sep 25, 2010 at 7:32 AM


As someone who programmed in C++ for many years before .NET came along, I too have been spoiled by the ease of use of C# and the .NET Framework.  When I look back on my C++ projects, I frankly don't know how I managed to get my work done using such a difficult, unforgiving, error-prone language.  Actually, I do know -- it involved many long, painful hours tracking down null pointers, memory leaks, buffer overruns, and the like.  Once I switched to C# in the early years of .NET I never looked back, and both C# and the .NET Framework just keep getting better with each release.

Regarding SNAP, NodeXL combines the best of both worlds -- namely the ease of use and familiarity of Excel (for end users) and .NET (for programmers), along with the tremendous speed of SNAP -- by treating SNAP as a type of service that NodeXL calls to perform some tasks that would be much slower if NodeXL performed them itself.  These tasks include calculating some graph metrics and partitioning the graph into clusters.  The "service" is actually just a simple C++ executable that exposes only those SNAP functions that NodeXL needs.  NodeXL runs this executable on demand in a separate process, communicating with it through simple text files.  Thus, NodeXL gets SNAP's speed via a simple, opaque interface, without dealing with all the messiness of creating a C#/C++ wrapper for every SNAP class.

So you can see that NodeXL uses SNAP for a few specific tasks rather than wrapping the whole library, and that if you need all the power and speed of SNAP in your own application then you are probably better off working directly with SNAP rather than with NodeXL as an intermediary.  I don't know if there is any kind of C#/SNAP wrapper available, but you might ask Jure Leskovec, the researcher at Stanford who developed SNAP and assisted us in integrating it with NodeXL.  You can find his contact information on the About page on SNAP's Web site.

-- Tony