mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06: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.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]
|
Base.getindex(g::DirectProductGroupElem, i::Int) = g.elts[i]
|
||||||
function Base.setindex!{T<:GroupElem}(g::DirectProductGroupElem{T}, v::T, i::Int)
|
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))")
|
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}
|
N::DirectProductGroup{T}
|
||||||
P::PermGroup
|
P::PermGroup
|
||||||
|
|
||||||
function WreathProduct(G::Group, P::PermGroup)
|
function WreathProduct{T}(G::T, P::PermGroup) where {T}
|
||||||
N = DirectProductGroup(G, P.n)
|
N = DirectProductGroup(G, P.n)
|
||||||
return new(N, P)
|
return new(N, P)
|
||||||
end
|
end
|
||||||
@ -34,12 +34,12 @@ immutable WreathProductElem{T<:GroupElem} <: GroupElem
|
|||||||
p::perm
|
p::perm
|
||||||
# parent::WreathProduct
|
# parent::WreathProduct
|
||||||
|
|
||||||
function WreathProductElem(n::DirectProductGroupElem, p::perm,
|
function WreathProductElem{T}(n::DirectProductGroupElem{T}, p::perm,
|
||||||
check::Bool=true)
|
check::Bool=true) where {T}
|
||||||
if check
|
if check
|
||||||
length(n.elts) == parent(p).n || throw("Can't form WreathProductElem: lengths differ")
|
length(n.elts) == parent(p).n || throw("Can't form WreathProductElem: lengths differ")
|
||||||
end
|
end
|
||||||
return new(n, p)
|
return new{T}(n, p)
|
||||||
end
|
end
|
||||||
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},
|
WreathProductElem(n::DirectProductGroupElem{T}, p, check=true) where {T} = WreathProductElem{T}(n, p, check)
|
||||||
p::perm, check::Bool=true) = WreathProductElem{T}(n, p, check)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user