Trait ep_core::random_permutation::RandomPermutation
source · pub trait RandomPermutation {
type Item;
// Required method
fn random_permutation<Hashing: Hash>(
self,
random: &mut RandomNumberGenerator<Hashing>
) -> Option<Vec<Self::Item>>;
}
Expand description
Pseudo-random permutation. It’s as secure as the combination of the seed with which the RandomNumberGenerator is constructed and the hash function it uses to cycle the elements.
Required Associated Types§
Required Methods§
sourcefn random_permutation<Hashing: Hash>(
self,
random: &mut RandomNumberGenerator<Hashing>
) -> Option<Vec<Self::Item>>
fn random_permutation<Hashing: Hash>( self, random: &mut RandomNumberGenerator<Hashing> ) -> Option<Vec<Self::Item>>
Random permutation from an array of elements. This is guaranteed to return Some
except
in the case that self
is empty.
Object Safety§
This trait is not object safe.