throw message on (::GroupRing)(::Vector) when no basis is defined

This commit is contained in:
kalmarek 2018-09-06 22:52:48 +02:00
parent 49bb2ba4a0
commit 558cbc78d8
1 changed files with 1 additions and 0 deletions

View File

@ -163,6 +163,7 @@ end
# keep storage type
function (RG::GroupRing)(x::AbstractVector{T}) where T<:Number
isdefined(RG, :basis) || throw("Basis of GroupRing not defined. For advanced use the direct constructor of GroupRingElem is provided.")
length(x) == length(RG.basis) || throw("Can not coerce to $RG: lengths differ")
return GroupRingElem(x, RG)
end