igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Graph Equality in Python


From: Robin Müller-Bady
Subject: Re: [igraph] Graph Equality in Python
Date: Mon, 15 Dec 2014 12:31:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

Dear Gabor,

thank you very much. I propose, just for convenience and clean-code reasons, a method that that exactly does this in the following releases of igraph :-).

Thank you very much and best regards,

Robin

On 12/14/2014 03:50 PM, Gábor Csárdi wrote:
Hi,

you can query the list of edges, sort them (in case they are returned
unsorted), and then just compare the sorted list.

Gabor

On Sun, Dec 14, 2014 at 8:54 AM, Robin Müller-Bady
<address@hidden> wrote:
Dear all,

I'm currently looking for a method in the igraph Python implementation that
provides checking for graph equality of two graph, e.g. something like

g1 = Graph(3, directed=False)
g1.add_edges([(0,1), (1,2)])
g2 = Graph(3, directed=False)
g2.add_edges([(1,2), (0,1)])
g1.equals(g2)
True

I know that there is a "g1.isomorphic(g2)" function, but isomorphism is not
necessarily equality, e.g.:
g3 = Graph(3, directed=False)
g3.add_edges([(0,1), (0,2)])
g3.equals(g2)
False
g3.isomorphic(g2)
True

Is there anything like that?
I'm (more or less) new to python, in case I was missing something I am very
sorry in advance.

Best regards,

Robin

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

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