[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] igraph library

From: Tamas Nepusz
Subject: Re: [igraph] igraph library
Date: Mon, 28 Apr 2008 18:12:30 +0200

Dear Robin,

Has anyone successfully called the igraph routines from a Pascal source? I write network formation simulations in Pascal, and it would be nice to use the iGraph routines for calculating statistics. I know this is possible in principle, but it seems (like so many things that are possible in principle) it is not quite straightforward in practice. Any experience that you could share would be appreciated.
This would require the development of an interface between igraph and Pascal (similar to the ones that are available for R, Python and Ruby so far). I think these are called "packages" in FreePascal terminology. Based on my experience on developing the Python interface, I can say that this is a tedious process. If you are using FreePascal, here is a document that explains how to access C code from FreePascal:


This may or may not be of some use to you -- as for me, I don't have experience with Pascal and I think that the conversion between igraph_t and an equivalent Pascal type is not straightforward at all. You might try to ask for help on the FreePascal mailing lists about how to develop a FreePascal package for a C library - I think it is possible, since there are a few such packages listed at http://www.freepascal.org/packages/ . But it will take a lot of time to cover the complete igraph API.

Another possibility is to write the igraph-related things in Python, C, R or Ruby and then call the appropriate compiled executable from your Pascal program. (Of course you'll have to take care about exporting the data in some format that igraph can read from Python, R, C or Ruby, and you'll also have to convert the output of the executable back to a format that your program can digest).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]