We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ff8157 commit 5a65c72Copy full SHA for 5a65c72
src/permutations.jl
@@ -217,11 +217,7 @@ end
217
218
Generate all permutations of an array `a` where `a` may have duplicated elements.
219
"""
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
+multiset_permutations(a) = multiset_permutations(a, length(a))
225
226
227
multiset_permutations(a, t)
0 commit comments