Hi,

I'm currently working on Haskell language bindings to the igraph C
library and have stumbled upon functions like "igraph_subgraph" which
reassign the IDs of a graph such that all IDs go from 0 to n-1. Since my
Haskell implementation is using values that are internally attached to C
IDs this messes everything up for my graphs.

E.g. if I select the 2nd and 3rd vertices from the original graph

  'a' -- 'b' -- 'c'

I get  'a' -- 'b'  instead of  'b' -- 'c'  (the expected result) since
the IDs have changed and my (ID -> Value) dictionary is not up to date.

The Python lib somehow keeps track of those ID changes (see for example
the mailing list post [1]) and I had a look at the source code for the
Python bindings but I can't find out how it manages to do so. Is there
any way to find out which IDs were changed to what? Are there any
pointers in the graph struct that point to the original vertex ID or is
it noted somewhere what IDs are changed to what? Is there any other
trick I might have to do?


Thanks for your help

- Nils


[1] http://lists.gnu.org/archive/html/igraph-help/2011-07/msg00030.html

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to