igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] eigen and evcent functions


From: Gábor Csárdi
Subject: Re: [igraph] eigen and evcent functions
Date: Fri, 22 Nov 2013 10:21:58 -0500

For eigen, the eigenvalues are in the columns of 'vectors', not in the
rows, so you need m$vector[,1].

Gabor

On Fri, Nov 22, 2013 at 9:14 AM, Bita Shams <address@hidden> wrote:
> Hi
> I'm trying to calculate the eigenvector correspondent to largest eigenvalue
> of graph.
> The result obtained by "eigen" and "evcent" function were completely
> different although their eigenvalue  were equal.
> I wanna know how it it is explained and which one is more reliable?
> In the following, you can see  an example
> Best Regards
> B.S
>
>
>  sw<-watts.strogatz.game(1,20,2,0.01)
>  m<-eigen(get.adjacency(sw))
>  e=evcent(sw)
>  m$value[1]
> [1] 4
>  e$value
> [1] 4
>  m$vector[1,]
>  [1] -0.223606798  0.009051041 -0.316098210  0.316015499  0.011584659
> 0.048641352 -0.312464428  0.223606798  0.017765024  0.315728370
> [11]  0.024016675  0.000000000 -0.156667569  0.418184734 -0.211845338
> 0.234779796  0.139724510  0.283684792  0.004032193  0.316202058
>  e$vector
>  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

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