igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Neighbor vertices List


From: Gábor Csárdi
Subject: Re: [igraph] Neighbor vertices List
Date: Tue, 29 Sep 2009 22:01:01 +0200

On Tue, Sep 29, 2009 at 8:15 PM, Surendar Swaminathan
<address@hidden> wrote:
> Hello Gabor,
>
>  Thank you very much for the reply. This is what I tried and  it says
>
> At iterators.c:721 : Cannot create iterator, invalid vertex id,
> Invalid vertex id
>
> I am trying for a small example
>
> What I have is undirected graph.
>
> Node1                 Node2
> 2                           1
> 1                           3
> 3                           5
>
> library(igraph)
> tab<-read.csv("file path\name.csv')
> g<-graph.data.frame(tab,directed=FALSE)
> get.shortest.paths(g,2,5,mode=c("all"),weights=NULL)

There are only four vertices in your graph: "1", "2", "3" and "5".
graph.data.frame() uses symbolic vertex names, and
get.shortest.paths() uses numeric vertex IDS, starting from zero.

Best,
Gabor

>  At iterators.c:721 : Cannot create iterator, invalid vertex id,
> Invalid vertex id
>
> can you please help me with regard to this .Am I making any mistake
>
> Thank you very much for helping.
>
> Surendar
>
>
>
> On Mon, Sep 28, 2009 at 11:42 PM, Gábor Csárdi <address@hidden> wrote:
>> I think what you are looking for is probably the get.shortest.paths()
>> or the get.all.shortest.paths() functions.
>> Best,
>> Gabor
>>
>> On Tue, Sep 29, 2009 at 12:12 AM, Surendar Swaminathan
>> <address@hidden> wrote:
>>>  Is there a way I can list the nodes traversed from one node to the
>>> other nodes.
>>>
>>> Give a graph object. If I have a source node and Target node can I
>>> find a way to list all the nodes to reach from source node to target
>>> node.
>>>
>>>
>>> Example
>>>
>>> Node vv1            Node v2
>>>
>>> 1                          2
>>> 2                          3
>>> 3                          4
>>>
>>> when Input node 1,node 4 I want the output to list 2,3.
>>>
>>>
>>> Thank you very much for the help,
>>>
>>> surendar
>>>
>>>
>>> _______________________________________________
>>> igraph-help mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>
>>
>>
>> --
>> Gabor Csardi <address@hidden>     UNIL DGM
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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