1 unstable release
0.1.0 | Jul 17, 2023 |
---|
#1576 in Algorithms
39KB
725 lines
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 and some sub-set of positional indices, as 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 the modern implementation of the Fisher-Yates shuffling algo, or other methods defined within the relevant crates.
License: MIT
lib.rs
:
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.
Dependencies
~1.7–3MB
~55K SLoC