Skip to content

Commit

Permalink
Merge pull request #12 from kalmarek/fix/wlmetric_ball_serial
Browse files Browse the repository at this point in the history
fix error in wlmetric_ball_serial
  • Loading branch information
kalmarek authored Oct 14, 2020
2 parents 6e856dd + 3a540ea commit a8a1420
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ os:
- osx
julia:
- 1.3
- 1.4
- 1.5
- nightly
notifications:
email: true
email: false
matrix:
fast_finish: true
allow_failures:
Expand Down
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2020 Marek Kaluba

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 changes: 0 additions & 22 deletions LICENSE.md

This file was deleted.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Groups"
uuid = "5d8bd718-bd84-11e8-3b40-ad14f4a32557"
authors = ["Marek Kaluba <[email protected]>"]
version = "0.5.0"
version = "0.5.1"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down
6 changes: 1 addition & 5 deletions src/Groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ word-length metric on the group generated by `S`. The ball is centered at `cente
(by default: the identity element). `radius` and `op` keywords specify the
radius and multiplication operation to be used.
"""

function wlmetric_ball_serial(
S::AbstractVector{T};
radius = 2,
Expand All @@ -81,10 +80,7 @@ function wlmetric_ball_serial(
old = unique!([one(first(S)), S...])
sizes = [1, length(old)]
for i = 2:radius
new = collect(
op(i, j)
for (i, j) in Base.product(@view(old[sizes[end-1]:end]), S)
)
new = collect(op(o, s) for o in @view(old[sizes[end-1]:end]) for s in S)
append!(old, new)
resize!(new, 0)
old = unique!(old)
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ using LinearAlgebra
S = [w,r,s]; S = unique([S; inv.(S)]);
_, sizes = Groups.wlmetric_ball(S, radius=4);
@test sizes == [7, 33, 141, 561]
_, sizes = Groups.wlmetric_ball_serial(S, radius=4);
@test sizes == [7, 33, 141, 561]
end

include("FreeGroup-tests.jl")
Expand Down

2 comments on commit a8a1420

@kalmarek
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/22967

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" a8a14206d1af449523be7f8dc738a0702715eb69
git push origin v0.5.1

Please sign in to comment.