diff --git a/Project.toml b/Project.toml index d9acf6a..3b50d0d 100644 --- a/Project.toml +++ b/Project.toml @@ -4,19 +4,19 @@ authors = ["Marek Kaluba "] version = "0.7.2" [deps] +Folds = "41a02a25-b8f0-4f67-bc48-60067656b558" GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" KnuthBendix = "c2604015-7b3d-4a30-8a26-9074551ec60a" OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -ThreadsX = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d" [compat] AbstractAlgebra = "0.22" +Folds = "0.2.7" GroupsCore = "0.4" KnuthBendix = "0.3" OrderedCollections = "1" PermutationGroups = "0.3" -ThreadsX = "0.1" julia = "1.3" [extras] diff --git a/src/Groups.jl b/src/Groups.jl index c662566..cc7ec85 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -1,7 +1,7 @@ module Groups using GroupsCore -using ThreadsX +using Folds import KnuthBendix import KnuthBendix: AbstractWord, Alphabet, Word import KnuthBendix: alphabet diff --git a/src/wl_ball.jl b/src/wl_ball.jl index ebb370c..69fce79 100644 --- a/src/wl_ball.jl +++ b/src/wl_ball.jl @@ -8,14 +8,14 @@ radius and multiplication operation to be used. """ function wlmetric_ball_serial(S::AbstractVector{T}, center::T=one(first(S)); radius = 2, op = *) where {T} @assert radius >= 1 - old = unique!([center, [center*s for s in S]...]) + old = union!([center], [center*s for s in S]) return _wlmetric_ball(S, old, radius, op, collect, unique!) end function wlmetric_ball_thr(S::AbstractVector{T}, center::T=one(first(S)); radius = 2, op = *) where {T} @assert radius >= 1 - old = unique!([center, [center*s for s in S]...]) - return _wlmetric_ball(S, old, radius, op, ThreadsX.collect, ThreadsX.unique) + old = union!([center], [center*s for s in S]) + return _wlmetric_ball(S, old, radius, op, Folds.collect, Folds.unique) end function _wlmetric_ball(S, old, radius, op, collect, unique)