mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 07:20:28 +01:00
improve slightly orthSVD
This commit is contained in:
parent
3c51a463dc
commit
4ba2f54bb4
@ -164,11 +164,10 @@ function Cstar_repr{T}(x::GroupRingElem{T}, mreps::Dict)
|
||||
return sum(x[g].*mreps[g] for g in parent(x).basis if x[g] != zero(T))
|
||||
end
|
||||
|
||||
function orthSVD(M::AbstractMatrix)
|
||||
function orthSVD{T}(M::AbstractMatrix{T})
|
||||
M = full(M)
|
||||
fact = svdfact(M)
|
||||
singv = fact[:S]
|
||||
M_rank = sum(singv .> maximum(size(M))*eps(eltype(singv)))
|
||||
M_rank = sum(fact[:S] .> maximum(size(M))*eps(T))
|
||||
return fact[:U][:,1:M_rank]
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user