fine-tune orthSVD
This commit is contained in:
parent
cc0f07bfd2
commit
d2e2862ae6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user