Crate importunate

source ·
Expand description

githubcrates-iodocs-rs


Methods for choosing random elements from an iterator.


§Usage

use importunate::*;

let arr1 = [2,0,1,3];
let mut arr2 = ["zero", "one", "two", "three"];
let perm = Permutation::<u8,4>::calculate_unchecked(arr1, |&x|x);
perm.apply(&mut arr2);

assert_eq!(arr2,["two","zero", "one",  "three"] );

§Readme Docs

You can find the crate’s readme documentation on the crates.io page, or alternatively in the README.md file on the GitHub project repo.

Modules§

  • Inner types that Permutations can use
  • Allows you to solve permutations - finding the shortest sequence of permutations that lead to it

Structs§