mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-14 14:15:28 +01:00
move orthSVD close to OrbitData
This commit is contained in:
parent
fc0a9ccfec
commit
8fa7e1211f
@ -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
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user