From e6ad20cb2360ab9bea7110b09aba5bd8ded03c8d Mon Sep 17 00:00:00 2001 From: kalmarek Date: Wed, 15 Aug 2018 19:20:28 +0200 Subject: [PATCH] replace loop by array comprehension --- src/Projections.jl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Projections.jl b/src/Projections.jl index 0617283..983df88 100644 --- a/src/Projections.jl +++ b/src/Projections.jl @@ -148,11 +148,7 @@ function rankOne_projections(RG::GroupRing{G}, T::Type=Rational{Int}) where G<:G RGidems = idempotents(RG, T) - min_projs = Vector{eltype(RGidems)}(length(AllParts(G.n))) - - for (i,chi) in enumerate(characters(G)) - min_projs[i] = rankOne_projection(chi,RGidems)*central_projection(RG,chi) - end + min_projs = [central_projection(RG,chi)*rankOne_projection(chi,RGidems) for chi in characters(RG.group)] return min_projs end