Sorry, definitely posted the wrong code (problem still real though!). Here 
is the code I meant to post

T = [.90 .05 .05;
    .80 .10 .10;
    .70 .10 .20]'
v = collect(eigs(T,nev=1,which = :LR)[2])
v/sum(v)


u = real(eig(T)[2][:,1])
u/sum(u)


print(u-v)


On Saturday, September 6, 2014 9:12:31 PM UTC+2, Gabriel Mitchell wrote:
>
> I am interested in a fast way to get the dominant eigenvalue/eigenvector 
> of a matrix. The function eigs looked promising. However the following call 
> to eigs produces non-deterministic (at and any rate wrong) results (on both 
> 0.3.0-rc3 and current release).
>
> T = [.90 .05 .05;
>     .80 .10 .10;
>     .70 .10 .20]'
> v = collect(eigs(T,nev=1,which = :LR)[2])
> v/sum(v)
>
> u = real(eig(T)[1])
> u/sum(u)
>
> print(u-v)
>
> So two questions:
> (1) Does anyone see what I am doing wrong or should I file an issue?
> (2) For now I will stick with eigs, but I wonder if anyone can recommend 
> an existing performant way to get what I want?
>

Reply via email to