igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] delete.vertices


From: Tamas Nepusz
Subject: Re: [igraph] delete.vertices
Date: Wed, 21 Jan 2015 08:37:41 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

Vertex indices in igraph are always in the range [0; |V|-1] where |V| is the
nubmer of vertices. When you delete some vertices, the vertex IDs may get
renumbered, so vertex 18 after the deletion is not the same as vertex 18 before
the deletion. Use the "name" vertex attribute to keep track of vertices; the
vertex attributes are always kept.

T.


On 01/21, Ragia Ibrahim wrote:
> 
> Hi, 
> firstly accept my pardon for the long Email, but I wanted to clarify my issue.
> 
>   a graph crated via fire forest model. the problem is as follows:
>  the following edges in the graph regarding node 18
>      18 -> 12
> [35] 18 ->  8
> [36] 18 ->  5
> [37] 18 ->  4
> [38] 18 -> 14
> [39] 18 -> 15
> [40] 18 -> 10
> [41] 18 ->  6
> [42] 18 ->  9
> [43] 18 ->  2
> [44] 18 -> 11
> [45] 18 -> 13
> [46] 18 ->  7
> [47] 18 ->  3
> 
> when getting neighbors of 18 , I got this
>  neighbors(g,18 , mode =  "out")
>  [1]  2  3  4  5  6  7  8  9 10 11 12 13 14 15
> deleting nodes {23 13 12} and keeping the result in new_g
> 
> and re getting node 18 neighbors
> result this
> neighbors(new_g, 18,mode =  "out")
> [1] 8
> where is the others? shall I induce other graph without those nodes ?
> 
> thanks in advance
> R.I
> 
> 
> 
>                                         

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


-- 
T.



reply via email to

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