fine-tune orthSVD

This commit is contained in:
kalmar 2017-06-21 16:44:14 +02:00
parent cc0f07bfd2
commit d2e2862ae6

View File

@ -128,10 +128,9 @@ end
function orthSVD(M::AbstractMatrix)
M = full(M)
fact = svdfact(M)
sings = fact[:S]
M_rank = sum(fact[:S] .> maximum(size(M))*eps(eltype(fact[:S])))
Ufactor = fact[:U]
return Ufactor[:,1:M_rank]
singv = fact[:S]
M_rank = sum(singv .> maximum(size(M))*eps(eltype(singv)))
return fact[:U][:,1:M_rank]
end
function Uπ_matrices(P_matrices; orth=orthSVD)