1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-28 18:50:29 +01:00

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

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