permutations_iter 0.1.1

Generate permutations iteratively without recursion in O(n) time.
Documentation
  • Coverage
  • 80%
    4 out of 5 items documented0 out of 4 items with examples
  • Size
  • Source code size: 5.99 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.96 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • acarturk-e/permutations_iter
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • acarturk-e

permutations_iter

An iterative permutation generator without recursion for Rust.

Iterator Permutations::of(n) generates permutations of 0..n iteratively using Steinhaus-Johnson-Trotter algorithm with Even's modification.

Each next() call has $O(n)$ time and space complexity.

Not optimized. At all. Any improvements are welcome.

Published under MIT license.