1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-25 02:05:30 +01:00

replace ThreadsX by Folds

This commit is contained in:
Marek Kaluba 2022-04-02 14:18:53 +02:00
parent adb42c8919
commit db5d60134c
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
3 changed files with 6 additions and 6 deletions

View File

@ -4,19 +4,19 @@ authors = ["Marek Kaluba <kalmar@amu.edu.pl>"]
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]

View File

@ -1,7 +1,7 @@
module Groups
using GroupsCore
using ThreadsX
using Folds
import KnuthBendix
import KnuthBendix: AbstractWord, Alphabet, Word
import KnuthBendix: alphabet

View File

@ -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)