igraph-help
[Top][All Lists]
Advanced

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

[igraph] evcent - unclear results


From: Florian Umlauf
Subject: [igraph] evcent - unclear results
Date: Thu, 23 May 2013 19:58:34 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Hi,

I was wondering how the following result could happen. I am using igraph::evcent for the calculation for my own model statistics. So I make some experiments and repeat some statistics.

> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a,scale=FALSE)$vector
 [1] 0.2236051 0.2236051 0.2236051 0.2236051 0.2236051 0.2236051 0.2236051
 [8] 0.2236051 0.2236051 0.2236051 0.2236084 0.2236084 0.2236084 0.2236084
[15] 0.2236084 0.2236084 0.2236084 0.2236084 0.2236084 0.2236084

> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a,scale=FALSE)$vector
 [1] 0.2236066 0.2236066 0.2236066 0.2236066 0.2236066 0.2236066 0.2236066
 [8] 0.2236066 0.2236066 0.2236066 0.2236070 0.2236070 0.2236070 0.2236070
[15] 0.2236070 0.2236070 0.2236070 0.2236070 0.2236070 0.2236070

> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a,scale=FALSE)$vector
 [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [8] 0.0000000 0.0000000 0.0000000 0.2236073 0.2236073 0.2236073 0.2236073
[15] 0.2236073 0.2236073 0.2236073 0.2236073 0.2236073 0.2236073


As you can see I get in return different values (zeros) at the third try.  There are some zero values How could that happen? It also happens with scale=TRUE.

> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a)$vector
 [1] 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
 
> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a)$vector
 [1] 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
 
> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a)$vector
 [1] 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
 
> a <- igraph::graph.ring(10) + igraph::graph.ring(10)
> igraph::evcent(a)$vector
 [1] 0.9999876 0.9999876 0.9999876 0.9999876 0.9999876 0.9999876 0.9999876
 [8] 0.9999876 0.9999876 0.9999876 1.0000000 1.0000000 1.0000000 1.0000000
[15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000

Thank you for answers.

R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252 
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                 
[5] LC_TIME=German_Germany.1252  

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base   

loaded via a namespace (and not attached):
[1] igraph_0.6.5-1


reply via email to

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