igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Unwanted multiple edges between vertices


From: Ram MS
Subject: Re: [igraph] Unwanted multiple edges between vertices
Date: Sat, 19 Jul 2014 11:23:50 +0530

Thank you, that explains it all. I didn't know that it would create an undirected graph by default.

And sorry about the trouble of having to guess. My code to read a data set and create the adj and cost matrices is a bit too lengthy to post here. So I thought some inline comments would give enough information about what is happening on my side.

In any case, now I understand what is going on. Thank you very much!

Regards,
Ram


On Sat, Jul 19, 2014 at 3:15 AM, Tamás Nepusz <address@hidden> wrote:
Hello,

Unfortunately your example is not self-contained (i.e. I cannot run it straight away without having to make up some artificial input) so I can only guess at this point. Could it simply be the case that there exists a pair of nodes A and B such that A is one of the k nearest neighbors of B and vice versa? In this case, you would obviously have a mutual edge pair between nodes A and B -- but since your graph is undirected, this edge pair simply appears as two undirected edges.

--
T.

-----Original Message-----
From: Ram MS <address@hidden>
Reply: Help for igraph users <address@hidden>>
Date: 18 July 2014 at 07:58:27
To: address@hidden <address@hidden>>
Subject:  [igraph] Unwanted multiple edges between vertices

> Hi,
>
> I am creating an instance of igraph in Python and adding some vertices and
> edges using add_vertices and add_edges methods of the Graph object. All the
> vertices and edges are created in one go. I have a 'name' attribute on the
> vertices and a 'weight' attribute on the edges. Strangely, I am observing
> multiple edges added between some vertices with the same weight.
>
> Currently I am calling graph.simplify() to remove the unwanted multiple
> edges after the graph is constructed. But I am wondering why it is creating
> multiple edges at all. Could someone help me see what might be going on?
>
> Thanks,
> Ram
> _______________________________________________
> 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]