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