Skip to content

Commit

Permalink
rename factorization -> factor
Browse files Browse the repository at this point in the history
  • Loading branch information
BjSchaefer committed Apr 10, 2024
1 parent bd8ef20 commit fc72cb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ function *(pp_1::PartitionedPermutation, pp_2::PartitionedPermutation)
end

"""
factorization(pp::PartitionedPermutation)
factor(pp::PartitionedPermutation)
Return the factorization of `pp` in form of a set of 2-tuples.
# Examples
```jldoctest
julia> length(factorization(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2])))
julia> length(factor(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2])))
2
```
"""
function factorization(pp::PartitionedPermutation)
function factor(pp::PartitionedPermutation)
size = length(upper_points(partition(pp)))

product_pairs = Set{Tuple{PartitionedPermutation, PartitionedPermutation}}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import Oscar:
size,
set_partition,
partition,
permutation
permutation,
factor


export PartitionedPermutation
Expand All @@ -40,7 +41,6 @@ export permutation
export length
export adjusted_length
export enumerate_partitioned_permutations
export factorization


include("PartitionedPermutation.jl")
Expand All @@ -56,4 +56,3 @@ export partitioned_permutation

export adjusted_length
export enumerate_partitioned_permutations
export factorization
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
partitioned_permutation(perm(symmetric_group(6), [1, 2, 3, 4, 5, 6]), [1, 2, 3, 4, 5, 6])
@test partitioned_permutation(perm(symmetric_group(3), [1, 2, 3]), [1, 2, 3]) * partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 3]) ==
partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2])
@test length(factorization(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2]))) == 2
@test length(factorization(partitioned_permutation(perm(symmetric_group(4), [2, 1, 4, 3]), [1, 1, 2, 2]))) <
length(factorization(partitioned_permutation(perm(symmetric_group(4), [1, 2, 3, 4]), [1, 2, 3, 4])))
@test length(factorization(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2]))) <
length(factorization(partitioned_permutation(perm(symmetric_group(3), [1, 2, 3]), [1, 2, 3])))
@test length(factor(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2]))) == 2
@test length(factor(partitioned_permutation(perm(symmetric_group(4), [2, 1, 4, 3]), [1, 1, 2, 2]))) <
length(factor(partitioned_permutation(perm(symmetric_group(4), [1, 2, 3, 4]), [1, 2, 3, 4])))
@test length(factor(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2]))) <
length(factor(partitioned_permutation(perm(symmetric_group(3), [1, 2, 3]), [1, 2, 3])))
end
end

0 comments on commit fc72cb6

Please sign in to comment.