#permutations #no-std #heaps-algorithm #lexicographic

no-std permutohedron

Generate permutations of sequences. Either lexicographical order permutations, or a minimal swaps permutation sequence implemented using Heap’s algorithm.

13 releases

Uses old Rust 2015

0.2.4 Nov 11, 2017
0.2.3 Nov 11, 2017
0.2.2 Oct 12, 2016
0.2.1 Feb 16, 2016
0.1.4 Jun 30, 2015

#345 in Algorithms

Download history 1926/week @ 2021-09-26 2338/week @ 2021-10-03 2436/week @ 2021-10-10 2452/week @ 2021-10-17 2474/week @ 2021-10-24 2981/week @ 2021-10-31 2809/week @ 2021-11-07 2752/week @ 2021-11-14 2487/week @ 2021-11-21 2502/week @ 2021-11-28 1960/week @ 2021-12-05 2092/week @ 2021-12-12 1564/week @ 2021-12-19 922/week @ 2021-12-26 1566/week @ 2022-01-02 2191/week @ 2022-01-09

6,322 downloads per month
Used in 16 crates (13 directly)

MIT/Apache

18KB
310 lines

permutohedron

Generate permutations of sequences.

Please read the API documentation here

build_status crates

How to use with cargo:

[dependencies]
permutohedron = "0.2"

Recent Changes

  • 0.2.4
    • Document a panic case in Heap::new that was not mentioned before
  • 0.2.3
    • Add license files to the repo and package, thanks to @ignatenkobrain
  • 0.2.2
    • Add trait ControlFlow and allow optionally terminating heap_recursive early.
  • 0.2.1
    • Add feature std (enabled by default) that allows you to opt out of using libstd.
  • 0.2.0
    • Add trait LexicalPermutation for lexicographical order of permutations, from Rust's libcore
  • 0.1.6
    • Small optimization of heap_recursive
  • 0.1.5
    • Cache-use / data layout optimizations for Heap
  • 0.1.4
    • Optimizations for Heap
  • 0.1.3
    • Fix an error in heap_recursive
  • 0.1.1
    • Add heap_recursive, a faster callback-based version of Heap's algorithm that can compute permutations of a sequence.
  • 0.1.0
    • Add Heap, an iterative walker & iterator using Heap's algorithm to compute permutations of a sequence.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

No runtime deps

Features

  • std
Z