From 61bed0f3d04035066f27913d69e5433fd33b3046 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Sun, 10 Sep 2017 21:42:45 +0200 Subject: [PATCH] allow to have 0s in completed pm --- src/GroupRings.jl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 2349831..8a2e96e 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -556,12 +556,21 @@ function complete!(RG::GroupRing) RG.basis = [elements(RG.group)...] end - fastm!(RG, fill=true) + fastm!(RG, fill=false) + warning = false 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]] + g = RG.basis[i]*RG.basis[j] + if haskey(RG.basis_dict, g) + RG.pm[i,j] = RG.basis_dict[g] + else + if !warning + warning = true + end + end end + warning && warn("Some products were not supported on basis") return RG end