From d80cee5df5c77538406d5d8d1091c5fc17a17242 Mon Sep 17 00:00:00 2001 From: kalmar Date: Wed, 19 Jul 2017 22:57:59 +0200 Subject: [PATCH] when completing RG.pm compute only missing products --- src/GroupRings.jl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index e199ea2..1038bbb 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -487,15 +487,11 @@ function complete!(RG::GroupRing) if !isdefined(RG, :basis_dict) RG.basis_dict = reverse_dict(RG.basis) end - if !isdefined(A, :pm) - A.pm = try - create_pm(A.basis, A.basis_dict) - catch err - isa(err, KeyError) && throw("Product is not supported on basis") - throw(err) - end + for linidx in find(RG.pm .== 0) + i,j = ind2sub(size(RG.pm), linidx) + RG.pm[i,j] = RG.basis_dict[RG.basis[i]*RG.basis[j]] end - return A + return RG end end # of module GroupRings