igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] an igraph isomorphism problem


From: Paul Leopardi
Subject: Re: [igraph] an igraph isomorphism problem
Date: Tue, 17 Dec 2013 18:40:18 -0800 (PST)

Hi Tamas, and all,

On Sunday, 25 August 2013 05:52:59 UTC+10, Tamás Nepusz wrote:
> using g1.isomorphic_vf2( g2, ... ... , return_mapping_12=True ), we'll get this result: (True,[3,2,1],None), because their in and out degrees match. but the edge multiplicities do not match at all. that means edge_color1 and edge_color2 options are ignored for some unknown reason( is that possible to be a bug? ).
You are right, this is a bug and it occurs only with the Python interface, and only if you use isomorphic_vf2. I have recently committed a fix into our repository:

https://github.com/igraph/igraph/commit/38b76ddee419053cbb8b3428d32f22adb6bcf483

If you compiled the Python interface of igraph from source, the easiest is probably to make the same change yourself (it involves changing a single line in src/graphobject.c) and then recompile the Python interface. Alternatively, there are two workarounds that you can use:


Seeing this, I downloaded igraph from current git master, and found that I still needed to make the following change:

address@hidden:~/sync/src-downloaded/igraph/git/igraph$ git diff -b
diff --git a/interfaces/python/src/graphobject.c b/interfaces/python/src/graphobject.c
index c12a6ea..e80e268 100644
--- a/interfaces/python/src/graphobject.c
+++ b/interfaces/python/src/graphobject.c
@@ -8030,7 +8030,7 @@ PyObject *igraphmodule_Graph_isomorphic_vf2(igraphmodule_GraphObject * self,
 
   if (!PyArg_ParseTupleAndKeywords
       (args, kwds, "|O!OOOOOOOOO", kwlist, &igraphmodule_GraphType, &o,
-       &color1_o, &color2_o, &edge_color1, &edge_color2, &return1, &return2,
+       &color1_o, &color2_o, &edge_color1_o, &edge_color2_o, &return1, &return2,
        &callback_fn, &node_compat_fn, &edge_compat_fn))
     return NULL;

Are you (Tamas) planning commit/38b76ddee419053cbb8b3428d32f22adb6bcf483 to master soon, or should I just continue to use my patched version?


reply via email to

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