mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
when completing RG.pm compute only missing products
This commit is contained in:
parent
9470d31e95
commit
d80cee5df5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user