From 36be0e000f9c83f729716b15933453ce3b249902 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 15 Sep 2017 19:02:24 +0200 Subject: [PATCH] parametrise GroupRingElem on the type of parent --- src/GroupRings.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 8cfeb95..e9f9f39 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -45,13 +45,13 @@ function GroupRing(G::Gr, b::Vector{T}, b_d::Dict{T,Int}, pm::Array{Int,2}) wher end GroupRing(G::Gr, pm::Array{Int,2}) where {Gr<:Group} = - GroupRing{Gr, elem_type(G)}(G, pm) + GroupRing{Gr}(G, pm) -mutable struct GroupRingElem{T, A<:AbstractVector} <: RingElem +mutable struct GroupRingElem{T, A<:AbstractVector, GR<:GroupRing} <: RingElem coeffs::A - parent::GroupRing + parent::GR - function GroupRingElem{T, A}(c::AbstractVector{T}, RG::GroupRing, check=true) where {T, A} + function GroupRingElem{T, A, GR}(c::AbstractVector{T}, RG::GR, check=true) where {T, A, GR} if check if isdefined(RG, :basis) length(c) == length(RG.basis) || throw( @@ -97,7 +97,7 @@ end ############################################################################### function GroupRingElem(c::AbstractVector, RG::GroupRing) - return GroupRingElem{eltype(c), typeof(c)}(c, RG) + return GroupRingElem{eltype(c), typeof(c), typeof(RG)}(c, RG) end function GroupRing(G::Group; fastm::Bool=false)