pub struct ArrayGenerator { /* private fields */ }Expand description
Deterministic array generator using seeded RNG
Implementations§
Source§impl ArrayGenerator
impl ArrayGenerator
Sourcepub fn generate(&self, size: usize, distribution: &Distribution) -> Vec<i32>
pub fn generate(&self, size: usize, distribution: &Distribution) -> Vec<i32>
Generate an array with the specified distribution
Sourcepub fn validate_array(
array: &[i32],
size: usize,
distribution: &Distribution,
) -> bool
pub fn validate_array( array: &[i32], size: usize, distribution: &Distribution, ) -> bool
Validate that the generated array is correct
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArrayGenerator
impl RefUnwindSafe for ArrayGenerator
impl Send for ArrayGenerator
impl Sync for ArrayGenerator
impl Unpin for ArrayGenerator
impl UnwindSafe for ArrayGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more