pub trait DistributionExt<T>: Distribution<T> + Sized {
// Provided methods
fn random_array<R: Rng, Dim: Dimension>(
&self,
rng: &mut Random<R>,
shape: Dim,
) -> Array<T, Dim>
where Self: Copy { ... }
fn sample_vec<R: Rng>(&self, rng: &mut Random<R>, size: usize) -> Vec<T>
where Self: Copy { ... }
}Expand description
Extension trait for distributions to create arrays directly
This provides a consistent interface for generating random arrays across the SCIRS2 ecosystem.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.