Is there a way to pre-allocate an array to hold the returned eigenvalues and vectors from
eigen! ? Currently both functions return a factorization which does not seem to allow a pre-allocation. The following code shows what I would like to do but does not work:
julia> A=rand(100,100); julia> evals=zeros(CF64,100); julia> evecs=zeros(CF64,100,100); julia> julia> esys=Eigen(evals,evecs); julia> esys.values 0.0 + 0.0im julia> evals=1; julia> esys.values 1.0 + 0.0im julia> esys = eigen(A) julia> esys.values -3.0686209886339606 - 1.1725958631992774im julia> evals 1.0 + 0.0im
CF64=ComplexF64. I would hope that
eigen would write to
evecs but apparently it does not. I can also do something like this:
I haven’t found such a function though. Any suggestions? Or is there a reason why this is not making sense?