Crate predictive_shuffle

Source
Expand description

§predictive_shuffle

A predictive shuffling algorithm that allows for the predetermined selection of one or many items from a shuffled vec.

We define predictive as the ability for users to define the traits of a vector, with some sub-set of indices, to return the shuffled positions of those indices. This is a one-time operation that only computes the final shuffled locations of the input indices.

All algorithms can handle cryptographic, or non-cryptographic shuffling, with all shuffling implementations derived from an optimized version of Durstenfeld’s modern implementation of the Fisher-Yates shuffling algo.

Traits§

Shuffle

Functions§

byte_array
gen_batch_predictive_shuffle
Predict Shuffled Position of Items from Seed
gen_batch_predictive_shuffle_from_seed
Predict Shuffled Position of Items from Seed
gen_crypto_batch_predictive_shuffle
Predict Shuffled Position of Items from Seed
gen_crypto_batch_predictive_shuffle_from_seed
Predict Shuffled Position of Items from Seed
gen_crypto_modern_shuffle
Implementing a crpytographic randomization algorithm [‘rand_chacha::ChaCha20Rng’], to generate a shuffled vector with the modern Fisher-Yates Algorithm
gen_crypto_modern_shuffle_from_seed
Implementing a crpytographic rnadomization algorithm [‘rand_chacha::ChaCha20Rng’], shuffle a given vector from with a with the modern Fisher-Yates Algorithm
gen_crypto_predictive_shuffle
Predict Shuffled Position of Items
gen_crypto_predictive_shuffle_from_seed
Predict Shuffled Position of Items from Seed
gen_fastrand_shuffle
Generate shuffled vector with [‘fastrand::Rng’]
gen_fastrand_shuffle_from_seed
Generate shuffled vector with from a seed with [‘fastrand::Rng’]
gen_modern_shuffle
Generate a shuffled vector with the modern Fisher-Yates Algorithm
gen_modern_shuffle_from_seed
Generate a shuffled vector from a seed with the modern Fisher-Yates Algorithm
gen_predictive_shuffle
Predict shuffled position from size and starting position(s)
gen_predictive_shuffle_from_seed
Predict shuffled position from size and starting position(s) with a seed
hash