igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] R igraph: get.shortest.paths returns error


From: Gábor Csárdi
Subject: Re: [igraph] R igraph: get.shortest.paths returns error
Date: Wed, 8 Aug 2012 10:34:10 -0400

Thanks for the report! I cannot reproduce this on OSX and R 2.15.1, using

for (i in 1:10000) {
  g <- grg.game(100, 0.2)
  get.shortest.paths(g, from=1, to=c(2,3,4,5), output="epath")
}

So I am not sure what is happening here. I am running OS X 10.6.8,
btw, and igraph 0.6-2, of course.

G.

On Wed, Aug 8, 2012 at 5:19 AM, Tamas Nepusz <address@hidden> wrote:
> Dear Tobias,
>
> Thanks for the feedback. It seems that your problem is version-specific,
> i.e. it occurs with igraph in R 2.15.1 (confirmed on Mac OS X) but not in R
> 2.14.1 (confirmed on Linux). I have created a bug report for this and
> assigned it to Gabor, the developer of the R interface. You can subscribe to
> the bug report on the following page if you would like to be notified when
> this is fixed:
>
> https://bugs.launchpad.net/igraph/+bug/1034312
>
> Best,
> Tamas
>
>
> On 08/08/2012 10:56 AM, Tobias Heckmann wrote:
>> Dear Tamas,
>>
>> my RData file is unfortunately too large to send (43 MB).
>> I have now tried a random graph, and get.shortest.paths returns the same
>> error... Hence, it doesn't seem to depend on my data. I've attached the
>> RData file for my graph and my sessionInfo.
>>
>> Thank you very much for dealing with my problem !
>> Best regards
>> Tobias
>>
>>
>> Am 08/08/2012 09:48, schrieb Tamás Nepusz:
>>> Dear Tobias,
>>>
>>> This is strange; I still cannot reproduce your issue on my machine, neither 
>>> with "ordinary" R vectors nor with vertex sequences. Could you send me an 
>>> Rdata file with an example graph and a "startnode" and "tonodes" vector 
>>> that causes problems on your machine?
>>>
>>> Best,--
>>> T.
>>>
>>>
>>> On Wednesday, 8 August 2012 at 09:25, Tobias Heckmann wrote:
>>>
>>>> Dear Tamas,
>>>>
>>>> in the original version of my script (which worked on my old machine),
>>>> startnode is a simple R vector:
>>>>> str(startnode)
>>>>
>>>> num 177822
>>>>
>>>> while tonodes seems to be a vector sequence:
>>>>> str(tonodes)
>>>>
>>>> Class 'igraph.vs' atomic [1:286] 157812 158206 158605 158989 159367 ...
>>>> ..- attr(*, "env")=<environment: 0x1013523c>
>>>>
>>>> in ?get.shortest.paths, it reads that the "to" argument should be a
>>>> "numeric vector, the vertices to which the shortest paths will be
>>>> calculated..."
>>>> Hence, I also tried as.numeric(tonodes) in the "to" argument, but the
>>>> error remains the same.
>>>>
>>>> Cheers,
>>>> Tobias
>>>>
>>>> Am 08/08/2012 08:43, schrieb Tamas Nepusz:
>>>>> Dear Tobias,
>>>>>
>>>>>> Until today, the following command worked well:
>>>>>>
>>>>>> paths<-get.shortest.paths(graph,from=startnode,to=tonodes,mode="out",weights=NA,output="epath")
>>>>>>
>>>>>> Today, I installed R on a 64bit machine and tried running my script 
>>>>>> again.
>>>>>> This time, the command returned the following error:
>>>>>>
>>>>>> "At structural_properties.c:659 : Size of the `vertices' and the `to'
>>>>>> should match, Invalid value"
>>>>>
>>>>>
>>>>> I have tried this now on a random graph with random start and end nodes 
>>>>> and
>>>>> it seemed to work for me, so can you please let us know what is there in 
>>>>> the
>>>>> "startnode" and "tonodes" variables? Are they simple R vectors?
>>>>>
>>>>> Cheers,
>>>>> Tamas
>>>>>
>>>>> _______________________________________________
>>>>> igraph-help mailing list
>>>>> address@hidden (mailto:address@hidden)
>>>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ---
>>>> Dr. Tobias Heckmann
>>>> Wiss. Angestellter
>>>> Lehrstuhl für Physische Geographie
>>>> Katholische Universität Eichstätt-Ingolstadt
>>>> Ostenstraße 18
>>>> 85072 Eichstätt
>>>>
>>>> Tel.: 08421-93-1309
>>>> Fax: 08421-93-1787
>>>>
>>>>
>>>> _______________________________________________
>>>> igraph-help mailing list
>>>> address@hidden (mailto:address@hidden)
>>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



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



reply via email to

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