[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Graph attributes in R and C
From: |
Matthew Walker |
Subject: |
[igraph] Graph attributes in R and C |
Date: |
Tue, 19 Oct 2010 20:00:05 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 |
Hi,
I have a problem, I suspect I know why, but if I'm right, I have no idea
what to do! All help would be gratefully received.
I have written a plugin system. Graph measures are written in C/C++ and
turned into plugins. The plugins are loaded into a C++ program as
specified by a configuration file.
My intention was that I could use R to test/debug each of the plugins.
It all worked fine until I started to work with graph attributes.
Hence, I think the graph attributes are my problem.
My R-based test case goes like this: I create a graph and add an
attribute. I load the plugin and pass the graph to it and ask the
plugin to evaluate the graph. When (in C) we get to reading the graph
attribute, R dies with the error:
*** caught segfault ***
address (nil), cause 'unknown'
I suspect that I cannot use the C-based attribute handler for a graph
that has been converted from R to C using R_SEXP_to_igraph(). Is this
assumption correct? I suspect this because of the considerable amount
of attribute code in the file rinterface.c.
Thus, I guess my question is: Is there a correct way to do what I am
trying to do? Is there a way to convert an
R-based-graph-with-attributes to a C-based-graph-with-attributes? What
would you do?
Thanks greatly in advance,
Matthew
- [igraph] Graph attributes in R and C,
Matthew Walker <=