mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 18:15:29 +01:00
specialise generate_balls, products
This commit is contained in:
parent
1d3017389f
commit
17888437ff
@ -336,7 +336,7 @@ replace_all(W::GWord, subst_dict::Dict{GWord, GWord}) = replace_all!(deepcopy(W)
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function products{T}(X::AbstractVector{T}, Y::AbstractVector{T})
|
function products{T<:GroupElem}(X::AbstractVector{T}, Y::AbstractVector{T})
|
||||||
result = Vector{T}()
|
result = Vector{T}()
|
||||||
seen = Set{T}()
|
seen = Set{T}()
|
||||||
for x in X
|
for x in X
|
||||||
@ -351,7 +351,7 @@ function products{T}(X::AbstractVector{T}, Y::AbstractVector{T})
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function generate_balls(S, Id; radius=2)
|
function generate_balls{T<:GroupElem}(S::Vector{T}, Id::T; radius=2)
|
||||||
sizes = Vector{Int}()
|
sizes = Vector{Int}()
|
||||||
S = unshift!(S, Id)
|
S = unshift!(S, Id)
|
||||||
B = [Id]
|
B = [Id]
|
||||||
|
Loading…
Reference in New Issue
Block a user