From 92d1d69177a51b4459cf1f66e663f8405a728d07 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Mon, 20 Aug 2018 04:02:44 +0200 Subject: [PATCH] separate non-zero indices --- src/Orbit-wise.jl | 2 +- src/OrbitDecomposition.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Orbit-wise.jl b/src/Orbit-wise.jl index 77455c9..594ba95 100644 --- a/src/Orbit-wise.jl +++ b/src/Orbit-wise.jl @@ -163,7 +163,7 @@ end function save_preps(fname::String, preps) autS = parent(first(keys(preps))) - JLD.save(fname, "perms_d", [preps[elt].d for elt in elements(autS)]) + save(fname, "perms_d", [preps[elt].d for elt in elements(autS)]) end function check_property_T(sett::Settings) diff --git a/src/OrbitDecomposition.jl b/src/OrbitDecomposition.jl index 0c8c370..b150f25 100644 --- a/src/OrbitDecomposition.jl +++ b/src/OrbitDecomposition.jl @@ -119,7 +119,8 @@ function reconstruct_sol(preps::Dict{T, S}, Us::Vector, Ps::Vector, dims::Vector end function Cstar_repr(x::GroupRingElem{T}, mreps::Dict) where {T} - return sum(x[i].*mreps[parent(x).basis[i]] for i in findn(x.coeffs)) + nzeros = findn(x.coeffs) + return sum(x[i].*mreps[parent(x).basis[i]] for i in nzeros) end function orthSVD(M::AbstractMatrix{T}) where {T<:AbstractFloat}