don't complete if basis is not defined

This commit is contained in:
kalmarek 2018-08-15 19:27:19 +02:00
parent 607d2b42c0
commit d5e390bce3
1 changed files with 7 additions and 6 deletions

View File

@ -261,8 +261,12 @@ end
function (==)(A::GroupRing, B::GroupRing)
A.group == B.group || return false
complete!(A)
complete!(B)
if isdefined(A, :basis)
complete!(A)
end
if isdefined(B, :basis)
complete!(B)
end
A.pm == B.pm || return false
return true
end
@ -523,10 +527,7 @@ end
create_pm{T<:GroupElem}(b::Vector{T}) = create_pm(b, reverse_dict(b))
function complete!(RG::GroupRing)
if !isdefined(RG, :basis)
RG.basis = collect(elements(RG.group))
end
isdefined(RG, :basis) || throw(ArgumentError("Provide basis for completion first!"))
fastm!(RG, fill=false)
warning = false