mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-04 18:11:26 +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
|
||||
* `::PermutationGroup` : full PermutationGroup
|
||||
"""
|
||||
immutable WreathProduct{T<:Group} <: Group
|
||||
N::DirectProductGroup{T}
|
||||
P::PermGroup
|
||||
|
||||
type WreathProduct <: Group
|
||||
N::DirectProductGroup
|
||||
P::PermutationGroup
|
||||
|
||||
function WreathProduct(G::Group, P::PermutationGroup)
|
||||
N = DirectProductGroup(typeof(G)[G for _ in 1:P.n])
|
||||
function WreathProduct(G::Group, P::PermGroup)
|
||||
N = DirectProductGroup(G, P.n)
|
||||
return new(N, P)
|
||||
end
|
||||
end
|
||||
|
||||
type WreathProductElem <: GroupElem
|
||||
n::DirectProductGroupElem
|
||||
immutable WreathProductElem{T<:GroupElem} <: GroupElem
|
||||
n::DirectProductGroupElem{T}
|
||||
p::perm
|
||||
parent::WreathProduct
|
||||
# parent::WreathProduct
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user