1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-23 08:15:29 +01:00

fix the G() <-> one(G) dispatch dillema

This commit is contained in:
kalmarek 2018-08-20 03:35:34 +02:00
parent 540946528c
commit 2ef67b5195

View File

@ -44,10 +44,19 @@ function Laplacian(name::String, G::Group)
return Δ return Δ
end end
function Laplacian{T<:GroupElem}(S::Vector{T}, Id::T; radius::Int=2) function computeLaplacian(S::Vector{E}, radius) where E<:AbstractAlgebra.RingElem
R = parent(first(S))
return computeLaplacian(S, one(R), radius)
end
function computeLaplacian(S::Vector{E}, radius) where E<:AbstractAlgebra.GroupElem
G = parent(first(S))
return computeLaplacian(S, G(), radius)
end
function computeLaplacian(S, Id, radius)
info("Generating metric ball of radius $radius...") info("Generating metric ball of radius $radius...")
@time E_R, sizes = Groups.generate_balls(S, Id, radius=2*radius) @time E_R, sizes = Groups.generate_balls(S, Id, radius=2radius)
info("Generated balls of sizes $sizes.") info("Generated balls of sizes $sizes.")
info("Creating product matrix...") info("Creating product matrix...")