mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
short-circuting -> proper if...ends
This commit is contained in:
parent
3a50399fb0
commit
04257e9054
@ -298,15 +298,20 @@ function create_pm{T<:GroupElem}(basis::Vector{T}, basis_dict::Dict{T, Int},
|
|||||||
end
|
end
|
||||||
|
|
||||||
function complete(A::GroupRing)
|
function complete(A::GroupRing)
|
||||||
isdefined(A, :basis) || A.basis = collect(elements(A.group))
|
if !isdefined(A, :basis)
|
||||||
isdefined(A, :basis_dict) || A.basis_dict = reverse_dict(A.basis)
|
A.basis = collect(elements(A.group))
|
||||||
|
end
|
||||||
|
if !isdefined(A, :basis_dict)
|
||||||
|
A.basis_dict = reverse_dict(A.basis)
|
||||||
|
end
|
||||||
if !isdefined(A, :pm)
|
if !isdefined(A, :pm)
|
||||||
A.pm = try
|
A.pm = try
|
||||||
create_pm(basis, basis_dict)
|
create_pm(A.basis, A.basis_dict)
|
||||||
catch err
|
catch err
|
||||||
isa(err, KeyError) && throw("Product is not supported on basis!"))
|
isa(err, KeyError) && throw("Product is not supported on basis")
|
||||||
throw(err)
|
throw(err)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return A
|
return A
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user