mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-10-18 08:35:35 +02:00
initial @compat changes, works on v0.6 without warnings
This commit is contained in:
parent
db02dbb97c
commit
7fb68f8c68
@ -17,7 +17,7 @@ type GroupRing{Gr<:Group, T<:GroupElem} <: Ring
|
|||||||
basis_dict::Dict{T, Int}
|
basis_dict::Dict{T, Int}
|
||||||
pm::Array{Int,2}
|
pm::Array{Int,2}
|
||||||
|
|
||||||
function GroupRing(G::Gr; initialise=true)
|
function GroupRing{Gr, T}(G::Gr; initialise=true) where {Gr <: Group, T<:GroupElem}
|
||||||
A = new(G)
|
A = new(G)
|
||||||
if initialise
|
if initialise
|
||||||
complete(A)
|
complete(A)
|
||||||
@ -25,20 +25,21 @@ type GroupRing{Gr<:Group, T<:GroupElem} <: Ring
|
|||||||
return A
|
return A
|
||||||
end
|
end
|
||||||
|
|
||||||
function GroupRing(G::Gr, basis::Vector{T}, basis_dict::Dict{T,Int}, pm::Array{Int,2})
|
function GroupRing{Gr, T}(G::Gr, b::Vector{T}, b_d::Dict{T, Int}, pm::Array{Int,2}) where {Gr <: Group, T<:GroupElem}
|
||||||
return new(G, basis, basis_dict, pm)
|
return new(G, b, b_d, pm)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
GroupRing{Gr<:Group}(G::Gr;initialise=true) = GroupRing{Gr, elem_type(G)}(G, initialise=initialise)
|
GroupRing(G::Gr;initialise=true) where Gr <:Group = GroupRing{Gr, elem_type(G)}(G, initialise=initialise)
|
||||||
|
|
||||||
GroupRing{Gr<:Group, T<:GroupElem}(G::Gr, b::Vector{T}, b_d::Dict{T,Int}, pm::Array{Int,2}) = GroupRing{Gr, T}(G, b, b_d, pm)
|
GroupRing(G::Gr, b::Vector{T}, b_d::Dict{T,Int}, pm::Array{Int,2}) where {Gr<:Group, T<:GroupElem} = GroupRing{Gr, T}(G, b, b_d, pm)
|
||||||
|
|
||||||
type GroupRingElem{T<:Number} <: RingElem
|
type GroupRingElem{T<:Number} <: RingElem
|
||||||
coeffs::AbstractVector{T}
|
coeffs::AbstractVector{T}
|
||||||
parent::GroupRing
|
parent::GroupRing
|
||||||
|
|
||||||
function GroupRingElem(c::AbstractVector{T}, RG::GroupRing, check=true)
|
function GroupRingElem{T}(c::AbstractVector{T}, RG::GroupRing, check=true) where {T<:Number}
|
||||||
if check
|
if check
|
||||||
if isdefined(RG, :basis)
|
if isdefined(RG, :basis)
|
||||||
length(c) == length(RG.basis) || throw(
|
length(c) == length(RG.basis) || throw(
|
||||||
|
Loading…
Reference in New Issue
Block a user