Skip to content

Commit 5a65c72

Browse files
Update src/permutations.jl
Co-authored-by: Chengyu Han <[email protected]>
1 parent 7ff8157 commit 5a65c72

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/permutations.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,7 @@ end
217217
218218
Generate all permutations of an array `a` where `a` may have duplicated elements.
219219
"""
220-
function multiset_permutations(a)
221-
m = unique(collect(a))
222-
f = [count(==(x), a) for x in m]
223-
multiset_permutations(m, f, length(a))
224-
end
220+
multiset_permutations(a) = multiset_permutations(a, length(a))
225221

226222
"""
227223
multiset_permutations(a, t)

0 commit comments

Comments
 (0)