#sorting #permutations #order #group

permutation

Small utility for creating, manipulating, and applying permutations

10 unstable releases (3 breaking)

Uses old Rust 2015

0.4.1 Jul 21, 2022
0.4.0 Jan 25, 2022
0.3.0 Jan 24, 2022
0.2.5 Jul 17, 2017
0.1.0 Mar 26, 2017

#436 in Algorithms

Download history 2666/week @ 2023-12-17 1022/week @ 2023-12-24 3105/week @ 2023-12-31 3664/week @ 2024-01-07 5782/week @ 2024-01-14 4463/week @ 2024-01-21 4104/week @ 2024-01-28 5518/week @ 2024-02-04 4574/week @ 2024-02-11 3673/week @ 2024-02-18 4815/week @ 2024-02-25 4513/week @ 2024-03-03 5396/week @ 2024-03-10 5450/week @ 2024-03-17 5227/week @ 2024-03-24 5425/week @ 2024-03-31

21,731 downloads per month
Used in 50 crates (20 directly)

Apache-2.0/MIT

41KB
600 lines

Rust Permutations

Permutations is a rust library for manipulating and applying permutations.

//! A module for representing permutations, applying them to slices and indices,
//! and computing them from sort orders.
//!
//! Some practical uses of this module are:
//!  * Calculate a sort, and apply it later.
//!  * Calculate a sort on one vector, and apply it to multiple other vectors.
//!  * Calculate the new index of an element before sorting.
//!  * Remember the prior index of an element after sorting.
//!  * Undo a sort.
//!  * Compare the orderings of elements.

License

Dual licensed Apache-2.0 and MIT

Credits

Copyright 2017-2022 Jeremy Salwen jeremysalwen@gmail.com and contributors

  • Patrick Chieppe
  • Sean Prendi
  • Philippe Solodov
  • Andrii Borziak

lib.rs:

A module for representing permutations, applying them to slices and indices, and computing them from sort orders.

Some practical uses of this module are:

  • Calculate a sort, and apply it later.
  • Calculate a sort on one vector, and apply it to another vector.
  • Calculate a sort on one vector, and apply it to multiple other vectors.
  • Calculate the new index of an element before sorting.
  • Remember the prior index of an element after sorting.
  • Undo a sort.
  • Compare the orderings of elements.

No runtime deps