[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.
- [igraph] Export to json, Gabor Toth, 2015/01/13
- [igraph] Export to JSON, Gabor Toth, 2015/01/15
- Re: [igraph] Export to JSON, Gábor Csárdi, 2015/01/15
- Re: [igraph] Export to JSON, Bernie Hogan, 2015/01/15
- Re: [igraph] Export to JSON, Gabor Toth, 2015/01/15
- Re: [igraph] Export to JSON, Gábor Csárdi, 2015/01/20
- Re: [igraph] Export to JSON, Tamas Nepusz, 2015/01/20
- [igraph] delete.vertices, Ragia Ibrahim, 2015/01/21
- Re: [igraph] delete.vertices,
Tamas Nepusz <=
- Re: [igraph] delete.vertices, Gábor Csárdi, 2015/01/21
- Re: [igraph] delete.vertices, Ragia Ibrahim, 2015/01/22