[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] perl bindings
From: |
John Lapeyre |
Subject: |
[igraph] perl bindings |
Date: |
Fri, 5 Mar 2010 17:31:17 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.9; KDE/4.3.4; x86_64; ; ) |
Hello,
I am evaluating whether to create a perl interface to
igraph, and I wonder if anyone cares to give opinions (maybe
if you have experience with python and igraph). Aside from
deciding what's best for my project, there are other
questions.
Some options:
1) Make a simple binding of igraph data types to perl
objects (and maybe add named arguments etc, which is fairly
easy, but would require more hand coding). But perl has no
native C-,Fortran- like array type, so flexible IO, etc. would
be problematic. Did someone say python does have such a native
data type ?
2) Use PDL (perl data language), which provides C-like arrays.
This would work by writing a small number of routines to
copy data and also just array pointers between PDL data types
and igraph data types. Then you can use all of PDL routines
(IO,plotting, etc)
3) Make igraph objects subclasses of PDL objects. (you can't
actually do this, but PDL has some workaround). This could
be difficult because you have to make sure that array
pointers and sizes are always sync'ed in the structs (both
PDL and igraph ultimatley use structs). If PDL has reliable
hooks in its updating methods, then this has a chance of
working; but I am not sure about this. I would have to ask
PDL people.
3a) Rely on the user to call update functions by hand. ugly
and error prone.
Thanks,
John
- [igraph] perl bindings,
John Lapeyre <=