|
From: | Tamas Nepusz |
Subject: | Re: [igraph] Segmentation fault constructing graph when using igraph_attribute_table_t |
Date: | Wed, 29 Oct 2008 11:22:29 +0000 |
Hi Natalia,The "attribute table" is a set of handler functions that are called whenever something related to the graph attributes happen. (So it's not a table that stores graph attributes directly). The table is empty per default (no attribute handling is enabled). If you want to enable attribute handling in C, you have to attach the (pretty experimental) C attribute handler functions to the attribute table as follows:
igraph_i_set_attribute_handler(&igraph_cattribute_table);igraph_cattribute_table is a predefined table that refer to the attribute handler routines implemented in C. (When igraph runs inside Python or R, the attribute table is replaced by the respective Python or R attribute handler routines).
This doesn't work because the contents of the table that you created are undefined, and igraph will call a random memory address as a function whenever you create a graph.igraph_attribute_table_t table; igraph_i_set_attribute_table(&table);
-- Tamas
[Prev in Thread] | Current Thread | [Next in Thread] |