1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-27 01:10:28 +01:00

improve slightly orthSVD

This commit is contained in:
kalmarek 2017-11-08 09:50:58 +01:00
parent 3c51a463dc
commit 4ba2f54bb4

View File

@ -164,12 +164,11 @@ 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)) return sum(x[g].*mreps[g] for g in parent(x).basis if x[g] != zero(T))
end end
function orthSVD(M::AbstractMatrix) function orthSVD{T}(M::AbstractMatrix{T})
M = full(M) M = full(M)
fact = svdfact(M) fact = svdfact(M)
singv = fact[:S] M_rank = sum(fact[:S] .> maximum(size(M))*eps(T))
M_rank = sum(singv .> maximum(size(M))*eps(eltype(singv))) return fact[:U][:,1:M_rank]
return fact[:U][:,1:M_rank]
end end
function compute_orbit_data{T<:GroupElem}(logger, name::String, G::Nemo.Group, S::Vector{T}, AutS; radius=2) function compute_orbit_data{T<:GroupElem}(logger, name::String, G::Nemo.Group, S::Vector{T}, AutS; radius=2)