igraph-help
[Top][All Lists]
Advanced

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

[igraph] neighbors


From: harun pirim
Subject: [igraph] neighbors
Date: Mon, 1 Nov 2010 22:52:14 -0500

Hi All,

I see an interesting problem using neighbors() function. I have an undirected 
graph g2 with 90 vertices.

Here is how neighbors() works:

neighbors(g2,2)
 [1]  0  2  2 14 32 42 64 68 69 71 72 74 96


neighbors(g2,3)
 [1]  3  3  5  8 12 19 20 22 23 26 29 30 41 45 53 57 77 78 79 80 81 82 83 84 85 
86 87
[28] 88 89 90 92 93 94 95


neighbors(g2,4)
 [1]  4  4  6 10 13 14 15 16 17 18 24 25 27 34 35 39 46 47 48 50 54 55 56 59 60 
66 68
[28] 70 71 72 74

Basicly, output includes the node itself. and twice. Do you have any idea why 
it does so?

Thank you,


Harun Pirim


reply via email to

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