diff --git a/src/Orbit-wise.jl b/src/Orbit-wise.jl index 167d612..f36cf95 100644 --- a/src/Orbit-wise.jl +++ b/src/Orbit-wise.jl @@ -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 ############################################################################### # diff --git a/src/OrbitDecomposition.jl b/src/OrbitDecomposition.jl index 562f1f4..0589180 100644 --- a/src/OrbitDecomposition.jl +++ b/src/OrbitDecomposition.jl @@ -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))