Skip to content

Commit

Permalink
Merge pull request #32 from kalmarek/total_rewrite
Browse files Browse the repository at this point in the history
Total rewrite of the package:
 * Drop the dependency on `AbstractAlgebra.Perm`: we ship our own `Perm{T}` which is defined   inside `PermutationGroups.Perms` module. Notable changes from the `AA` version:
   - `AbstractPermutation` interface (testable!) which the new `Perm` follows
   - `Perm` caches its inverse (so that second and later calls to `inv` are essentially free!)
   - and tries very hard to make sure that there will be at most one inverse perm (that is unless you copy it explicitly).
   - caching usually is problematic with multithreading, but the new `Perm` tries to stay thread-safe 
   - due to the usage of `@atomic`s `Perm` is now a `mutable struct`, so creating a `Perm` requires two allocations (julia-1.9): one for the storage of images, second for the `Perm` object.
 * Rewrite `StabilizerChain` to use the recursive formulation and rewrite `schreier_sims` accordingly
 * New, rather fast iteration over leafs of the `StabilizerChain` tree (i.e. group elements)
 * switch to using `Transversal` by default. This is justified by benchmarks; If you want to use `SchreierTransversal` (e.g. because you run out of memory) you may do so by defining `PermGroup(SchreierTransversal, gens)`
 * By default `Perm`s use `UInt16` as storage; This applies to `perm"(1,2,3)"` macro as well. Again, you may change this by calling `PermGroup(Perm{UInt}.(gens))`; For "normal" usage `UInt32` should be more than enough though. 

 * Major breaking changes:
  - non-constant `degree` in a permutation group (in particular `degree(one(perm)) == 1`)
  - all `Perm`s are compatible (i.e. embedded in `Sym(∞)`)
  - `Permutation`s implement Group interface; `Perm`s don't.

If you use just external interface it is likely that this release won't be breaking for you.
  • Loading branch information
kalmarek committed Aug 16, 2023
2 parents 2eb3676 + 8c83160 commit 6609e16
Show file tree
Hide file tree
Showing 41 changed files with 2,142 additions and 1,501 deletions.
8 changes: 3 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name = "PermutationGroups"
uuid = "8bc5a954-2dfc-11e9-10e6-cd969bffa420"
authors = ["Marek Kaluba <kalmar@amu.edu.pl>", "tweisser <tillmann.weisser@web.de>"]
version = "0.3.4"
version = "0.4.0"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
AbstractAlgebra = "0.22 - 0.31"
GroupsCore = "0.4"
julia = "1.6"

[extras]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Random", "BenchmarkTools"]
test = ["Test", "Random", "BenchmarkTools", "AbstractAlgebra"]
41 changes: 0 additions & 41 deletions src/OrbitT/Orbit1.jl

This file was deleted.

43 changes: 0 additions & 43 deletions src/OrbitT/Orbit2.jl

This file was deleted.

43 changes: 0 additions & 43 deletions src/OrbitT/Orbit3.jl

This file was deleted.

45 changes: 0 additions & 45 deletions src/OrbitT/Orbit4.jl

This file was deleted.

47 changes: 0 additions & 47 deletions src/OrbitT/Orbit5.jl

This file was deleted.

18 changes: 18 additions & 0 deletions src/Perms/Perms.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module Perms

using GroupsCore
export AbstractPermutation, Perm, cycles, degree, permtype, @perm_str

include("cycle_decomposition.jl")

# abstract definitions
include("abstract_perm.jl")
include("arithmetic.jl")
include("misc.jl")

include("utils.jl")

# concrete implementations
include("perm_images.jl")
include("macro_perm.jl")
end
Loading

2 comments on commit 6609e16

@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
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/89771

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.4.0 -m "<description of version>" 6609e169c9fcf73ce4017370870f253df8e30797
git push origin v0.4.0

Please sign in to comment.