From 8d22162504ecd1b2bdd439007f8751f25799cd2f Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 11 Jul 2017 15:59:15 +0200 Subject: [PATCH] implement Array protocol for GroupRingElem --- src/GroupRings.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index d5059c8..312a385 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -160,7 +160,7 @@ end ############################################################################### # -# Basic manipulation +# Basic manipulation && Array protocol # ############################################################################### @@ -194,7 +194,8 @@ function setindex!(X::GroupRingElem, value, g::GroupElem) end end -eltype(X::GroupRingElem) = eltype(X.coeffs) +Base.size(X::GroupRingElem) = size(X.coeffs) +Base.linearindexing{T<:GroupRingElem}(::Type{T}) = Base.LinearFast() ############################################################################### #