igraph-help
[Top][All Lists]
Advanced

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

[igraph] Problems calculating shortest paths for sparse large graph


From: Charles Novaes de Santana
Subject: [igraph] Problems calculating shortest paths for sparse large graph
Date: Wed, 21 Nov 2012 12:07:26 +0100

Dear igraph users,

I am trying to calculate the shortest paths for a large sparse graph
(48000 nodes and 2000 edges). I am using a machine with 32Gb of RAM,
Linux installed, R version 2.14, and Igraph version 0.6.3.

Unfortunately I am not able to calculate the shortest paths, after
about 10 seconds calculating the paths it returns an error just like
this:

shortest_paths<-shortest.paths(net,weights=E(net)$weight);
Error in .Call("R_igraph_shortest_paths", graph, v - 1, to - 1,
as.numeric(mode),  :
  negative length vectors are not allowed

I also tried to ignore the weights, by using the option
"weights=E(net)$NA", but it didn't work.

However, when I try to calculate the shortest path between any pair of
nodes it works fine:

shortest.paths(net,weights=NA,v=1,to=2)
     [,1]
[1,]  Inf

I am reading the graph from a file in pajek format. Other functions,
like degree distribution, work fine with the entire graph.

I really appreciate any help about how to calculate the shortest paths.

Best,

Charles

-- 
Um axé! :)

--
Charles Novaes de Santana
http://www.imedea.uib-csic.es/~charles
PhD student - Global Change
Laboratorio Internacional de Cambio Global
Department of Global Change Research
Instituto Mediterráneo de Estudios Avanzados(CSIC/UIB)
Calle Miquel Marques 21, 07190
Esporles - Islas Baleares - España

Office phone - +34 971 610 896
Cell phone - +34 660 207 940



reply via email to

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