Trait concision_core::GenerateRandom

source ·
pub trait GenerateRandom<T = f64, D = Ix2>: Sized
where D: Dimension,
{ // Required methods fn rand<Sh, IdS>(dim: Sh, distr: IdS) -> Self where IdS: Distribution<T>, Sh: ShapeBuilder<Dim = D>; fn rand_using<Sh, IdS, R>(dim: Sh, distr: IdS, rng: &mut R) -> Self where IdS: Distribution<T>, R: Rng + ?Sized, Sh: ShapeBuilder<Dim = D>; // Provided methods fn bernoulli( dim: impl IntoDimension<Dim = D>, p: Option<f64> ) -> Result<Self, BernoulliError> where Bernoulli: Distribution<T> { ... } fn stdnorm(dim: impl IntoDimension<Dim = D>) -> Self where StandardNormal: Distribution<T> { ... } fn normal_from_key<R>(key: u64, dim: impl IntoDimension<Dim = D>) -> Self where StandardNormal: Distribution<T>, R: Rng + ?Sized { ... } fn uniform(axis: usize, dim: impl IntoDimension<Dim = D>) -> Self where T: Real + SampleUniform { ... } fn uniform_between(dk: T, dim: impl IntoDimension<Dim = D>) -> Self where T: Copy + Neg<Output = T> + SampleUniform { ... } }

Required Methods§

source

fn rand<Sh, IdS>(dim: Sh, distr: IdS) -> Self
where IdS: Distribution<T>, Sh: ShapeBuilder<Dim = D>,

source

fn rand_using<Sh, IdS, R>(dim: Sh, distr: IdS, rng: &mut R) -> Self
where IdS: Distribution<T>, R: Rng + ?Sized, Sh: ShapeBuilder<Dim = D>,

Provided Methods§

source

fn bernoulli( dim: impl IntoDimension<Dim = D>, p: Option<f64> ) -> Result<Self, BernoulliError>

source

fn stdnorm(dim: impl IntoDimension<Dim = D>) -> Self

source

fn normal_from_key<R>(key: u64, dim: impl IntoDimension<Dim = D>) -> Self

source

fn uniform(axis: usize, dim: impl IntoDimension<Dim = D>) -> Self
where T: Real + SampleUniform,

source

fn uniform_between(dk: T, dim: impl IntoDimension<Dim = D>) -> Self
where T: Copy + Neg<Output = T> + SampleUniform,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, D> GenerateRandom<T, D> for Array<T, D>

source§

fn rand<Sh, Dtr>(dim: Sh, distr: Dtr) -> Self
where Dtr: Distribution<T>, Sh: ShapeBuilder<Dim = D>,

source§

fn rand_using<Sh, Dtr, R>(dim: Sh, distr: Dtr, rng: &mut R) -> Self
where Dtr: Distribution<T>, R: Rng + ?Sized, Sh: ShapeBuilder<Dim = D>,

Implementors§