mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
hide correctness check of GroupRingElem behind check arg
This commit is contained in:
parent
796f04261d
commit
203743bb4d
@ -34,11 +34,12 @@ type GroupRingElem{T<:Number} <: RingElem
|
|||||||
coeffs::AbstractVector{T}
|
coeffs::AbstractVector{T}
|
||||||
parent::GroupRing
|
parent::GroupRing
|
||||||
|
|
||||||
function GroupRingElem(c::AbstractVector{T}, RG::GroupRing)
|
function GroupRingElem(c::AbstractVector{T}, RG::GroupRing, check=true)
|
||||||
isdefined(RG, :basis) || complete(RG)
|
if check
|
||||||
length(c) == length(RG.basis) || throw("Can't create GroupRingElem -- lengths differ: length(c) = $(length(c)) != $(length(RG.basis)) = length(RG.basis)")
|
isdefined(RG, :basis) || complete(RG)
|
||||||
|
length(c) == length(RG.basis) || throw("Can't create GroupRingElem -- lengths differ: length(c) = $(length(c)) != $(length(RG.basis)) = length(RG.basis)")
|
||||||
return new(c,RG)
|
end
|
||||||
|
return new(c, RG)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user