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) function orthSVD(M::AbstractMatrix)
M = full(M) M = full(M)
fact = svdfact(M) fact = svdfact(M)
sings = fact[:S] singv = fact[:S]
M_rank = sum(fact[:S] .> maximum(size(M))*eps(eltype(fact[:S]))) M_rank = sum(singv .> maximum(size(M))*eps(eltype(singv)))
Ufactor = fact[:U] return fact[:U][:,1:M_rank]
return Ufactor[:,1:M_rank]
end end
function Uπ_matrices(P_matrices; orth=orthSVD) function Uπ_matrices(P_matrices; orth=orthSVD)