igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] simplify returns non-simple graph


From: Jorge Gil
Subject: Re: [igraph] simplify returns non-simple graph
Date: Wed, 12 Dec 2012 20:26:54 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0

Hi Gabor,

Regarding the first issue, it was my mistake: is.simple(simplify(graph)) returns TRUE.
I was doing simplify(g) but forgot that the simplified result needs to be put back in another (or the same) object. So afterwards is.simple(g) was still returning FALSE...

As for the second problem, I found that one of the weight columns (length) has a few NA values. If I use the other weight or run the unweighted analysis it calculates closeness without crashing.
So, after setting the NA values in the 'length' attribute to 0 it now works fine.

In any case, I attach an R data set with the edge list data used to create the graph.

Thank you for your prompt support.
Jorge

On 12/12/2012 19:59, Gábor Csárdi wrote:
Hi Jorge,

thanks for your report. In order to reproduce this, we would need a graph for which is.simple(simplify(graph)) is FALSE. Do you have a small example?

Also, closeness or betweenness calculations should not crash R, so if you have an example graph for that, please share that, too. 

If you don't want to send your data to the mailing list, you can send it to me directly.

Thanks,
Gabor


On Wed, Dec 12, 2012 at 1:52 PM, Jorge Gil <address@hidden> wrote:
Hi,

I've got an undirected graph that when I calculate closeness or betweenness centrality it crashes R without an error message or explanation.

I'm creating the graph using an edges list, and use that exact script with other lists and it works. So I guess there must be some problem with the graph for that particular set of edges.

Querying 'is.simple(g)' returns FALSE, so that could be the reason for the crash?
But after doing 'simplify(graph, remove.multiple = TRUE, remove.loops = TRUE)' I still get FALSE result from is.simple.
Are there other conditions that make a graph not simple?

Are there special restrictions for graphs to be used in closeness and betweenness centrality that I'm forgetting?

Thanks in advance,
Jorge

--
Jorge Gil
PhD Candidate

TU Delft / Faculty of Architecture
Department of Urbanism
Chair of Spatial Planning and Strategy

Julianalaan 134
2628 BL Delft
P.O. Box 5043
2600 GA Delft
The Netherlands

www.tudelft.nl


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



--
Gabor Csardi <address@hidden>     MTA KFKI RMKI


-- 
Jorge Gil
PhD Candidate

TU Delft / Faculty of Architecture
Department of Urbanism
Chair of Spatial Planning and Strategy

Julianalaan 134
2628 BL Delft
P.O. Box 5043
2600 GA Delft
The Netherlands

www.tudelft.nl

Attachment: bus_routes.Rdata
Description: Binary data


reply via email to

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