mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
make WreathProduct{Elem} concrete & immutable
parametrize by WreathProduct{Elem} by T<:Group{Elem}
This commit is contained in:
parent
125e4a5263
commit
fa996d68fb
@ -18,24 +18,23 @@ doc"""
|
|||||||
* `::Group` : the single factor of group N
|
* `::Group` : the single factor of group N
|
||||||
* `::PermutationGroup` : full PermutationGroup
|
* `::PermutationGroup` : full PermutationGroup
|
||||||
"""
|
"""
|
||||||
|
immutable WreathProduct{T<:Group} <: Group
|
||||||
|
N::DirectProductGroup{T}
|
||||||
|
P::PermGroup
|
||||||
|
|
||||||
type WreathProduct <: Group
|
function WreathProduct(G::Group, P::PermGroup)
|
||||||
N::DirectProductGroup
|
N = DirectProductGroup(G, P.n)
|
||||||
P::PermutationGroup
|
|
||||||
|
|
||||||
function WreathProduct(G::Group, P::PermutationGroup)
|
|
||||||
N = DirectProductGroup(typeof(G)[G for _ in 1:P.n])
|
|
||||||
return new(N, P)
|
return new(N, P)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
type WreathProductElem <: GroupElem
|
immutable WreathProductElem{T<:GroupElem} <: GroupElem
|
||||||
n::DirectProductGroupElem
|
n::DirectProductGroupElem{T}
|
||||||
p::perm
|
p::perm
|
||||||
parent::WreathProduct
|
# parent::WreathProduct
|
||||||
|
|
||||||
function WreathProductElem(n::DirectProductGroupElem, p::perm)
|
function WreathProductElem(n::DirectProductGroupElem, p::perm)
|
||||||
length(n.elts) == parent(p).n
|
length(n.elts) == parent(p).n || throw("Can't form WreathProductElem: lengths differ")
|
||||||
return new(n, p)
|
return new(n, p)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user