JuliaMath / Combinatorics.jl

A combinatorics library for Julia
http://juliamath.github.io/Combinatorics.jl/dev/
Other
214 stars 58 forks source link

implemented iterative heap's algorithm #116

Closed mxkopy closed 2 years ago

mxkopy commented 2 years ago

Tests 50% faster using

t = rand(1:n) a = collect(1:n) @time f = collect( permutations_( a, t ) ) @time g = collect( permutations( a, t ) ) print( mapreduce( x -> x in f, &, g ) )