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

move orthSVD close to OrbitData

This commit is contained in:
kalmarek 2018-09-05 10:40:08 +02:00
parent fc0a9ccfec
commit 8fa7e1211f
2 changed files with 6 additions and 7 deletions

View File

@ -107,6 +107,12 @@ function save_preps(fname::String, preps)
save(fname, "perms_d", [preps[elt].d for elt in elements(autS)])
end
function orthSVD(M::AbstractMatrix{T}) where {T<:AbstractFloat}
M = full(M)
fact = svdfact(M)
M_rank = sum(fact[:S] .> maximum(size(M))*eps(T))
return fact[:U][:,1:M_rank]
end
###############################################################################
#

View File

@ -72,13 +72,6 @@ function matrix_repr(x::GroupRingElem, mreps::Dict)
return sum(x[i].*mreps[parent(x).basis[i]] for i in nzeros)
end
function orthSVD(M::AbstractMatrix{T}) where {T<:AbstractFloat}
M = full(M)
fact = svdfact(M)
M_rank = sum(fact[:S] .> maximum(size(M))*eps(T))
return fact[:U][:,1:M_rank]
end
function matrix_reps(preps::Dict{T,perm{I}}) where {T<:GroupElem, I<:Integer}
kk = collect(keys(preps))
mreps = Vector{SparseMatrixCSC{Float64, Int}}(length(kk))