mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-04 20:30:29 +01:00
fix deprecation warnings
This commit is contained in:
parent
32a76f9efa
commit
29d1b8364d
@ -45,7 +45,7 @@ parent(g::DirectProductGroupElem) =
|
||||
###############################################################################
|
||||
|
||||
Base.size(g::DirectProductGroupElem) = size(g.elts)
|
||||
Base.linearindexing(::Type{DirectProductGroupElem}) = Base.LinearFast()
|
||||
Base.IndexStyle(::Type{DirectProductGroupElem}) = Base.LinearFast()
|
||||
Base.getindex(g::DirectProductGroupElem, i::Int) = g.elts[i]
|
||||
function Base.setindex!{T<:GroupElem}(g::DirectProductGroupElem{T}, v::T, i::Int)
|
||||
parent(v) == parent(first(g.elts)) || throw("$g is not an element of $i-th factor of $(parent(G))")
|
||||
|
@ -23,7 +23,7 @@ immutable WreathProduct{T<:Group} <: Group
|
||||
N::DirectProductGroup{T}
|
||||
P::PermGroup
|
||||
|
||||
function WreathProduct(G::Group, P::PermGroup)
|
||||
function WreathProduct{T}(G::T, P::PermGroup) where {T}
|
||||
N = DirectProductGroup(G, P.n)
|
||||
return new(N, P)
|
||||
end
|
||||
@ -34,12 +34,12 @@ immutable WreathProductElem{T<:GroupElem} <: GroupElem
|
||||
p::perm
|
||||
# parent::WreathProduct
|
||||
|
||||
function WreathProductElem(n::DirectProductGroupElem, p::perm,
|
||||
check::Bool=true)
|
||||
function WreathProductElem{T}(n::DirectProductGroupElem{T}, p::perm,
|
||||
check::Bool=true) where {T}
|
||||
if check
|
||||
length(n.elts) == parent(p).n || throw("Can't form WreathProductElem: lengths differ")
|
||||
end
|
||||
return new(n, p)
|
||||
return new{T}(n, p)
|
||||
end
|
||||
end
|
||||
|
||||
@ -62,10 +62,9 @@ parent(g::WreathProductElem) = WreathProduct(parent(g.n[1]), parent(g.p))
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
WreathProduct{T<:Group}(G::T, P::PermGroup) = WreathProduct{T}(G, P)
|
||||
WreathProduct(G::Gr, P::PermGroup) where {Gr} = WreathProduct{Gr}(G, P)
|
||||
|
||||
WreathProductElem{T<:GroupElem}(n::DirectProductGroupElem{T},
|
||||
p::perm, check::Bool=true) = WreathProductElem{T}(n, p, check)
|
||||
WreathProductElem(n::DirectProductGroupElem{T}, p, check=true) where {T} = WreathProductElem{T}(n, p, check)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user