pub struct NormalBuilder<T: Num + Float, S: DimTrait, D: DeviceBase> { /* private fields */ }
Expand description
A builder for creating matrices filled with random values from a normal distribution.
Implementations§
Source§impl<T, S, D> NormalBuilder<T, S, D>
impl<T, S, D> NormalBuilder<T, S, D>
Sourcepub fn std_dev(self, std_dev: T) -> Self
pub fn std_dev(self, std_dev: T) -> Self
Sets the standard deviation of the normal distribution.
Sourcepub fn from_matrx<R2: Repr<Item = T>>(self, a: &Matrix<R2, S, D>) -> Self
pub fn from_matrx<R2: Repr<Item = T>>(self, a: &Matrix<R2, S, D>) -> Self
Sets the shape of the matrix to be the same as another matrix.
Sourcepub fn build(self) -> Matrix<Owned<T>, S, D>where
StandardNormal: Distribution<T>,
pub fn build(self) -> Matrix<Owned<T>, S, D>where
StandardNormal: Distribution<T>,
Trait Implementations§
Source§impl<T: Clone + Num + Float, S: Clone + DimTrait, D: Clone + DeviceBase> Clone for NormalBuilder<T, S, D>
impl<T: Clone + Num + Float, S: Clone + DimTrait, D: Clone + DeviceBase> Clone for NormalBuilder<T, S, D>
Source§fn clone(&self) -> NormalBuilder<T, S, D>
fn clone(&self) -> NormalBuilder<T, S, D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T, S, D> Freeze for NormalBuilder<T, S, D>
impl<T, S, D> RefUnwindSafe for NormalBuilder<T, S, D>
impl<T, S, D> Send for NormalBuilder<T, S, D>
impl<T, S, D> Sync for NormalBuilder<T, S, D>
impl<T, S, D> Unpin for NormalBuilder<T, S, D>
impl<T, S, D> UnwindSafe for NormalBuilder<T, S, D>
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