Skip to main content

MatrixDistribution

Struct MatrixDistribution 

Source
pub struct MatrixDistribution<D: Distribution<T>, T, const M: usize, const N: usize> {
    pub inner: D,
    /* private fields */
}
Expand description

Per-component matrix distribution.

Fields§

§inner: D

Implementations§

Source§

impl<D: Distribution<T>, T, const M: usize, const N: usize> MatrixDistribution<D, T, M, N>

Source

pub fn new(inner: D) -> Self

Trait Implementations§

Source§

impl<D: Distribution<T>, T, const M: usize, const N: usize> Distribution<Matrix<T, M, N>> for MatrixDistribution<D, T, M, N>

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Matrix<T, M, N>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> ⓘ
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more

Auto Trait Implementations§

§

impl<D, T, const M: usize, const N: usize> Freeze for MatrixDistribution<D, T, M, N>
where D: Freeze, PhantomData<Matrix<T, M, N>>: Freeze,

§

impl<D, T, const M: usize, const N: usize> RefUnwindSafe for MatrixDistribution<D, T, M, N>

§

impl<D, T, const M: usize, const N: usize> Send for MatrixDistribution<D, T, M, N>
where D: Send, PhantomData<Matrix<T, M, N>>: Send,

§

impl<D, T, const M: usize, const N: usize> Sync for MatrixDistribution<D, T, M, N>
where D: Sync, PhantomData<Matrix<T, M, N>>: Sync,

§

impl<D, T, const M: usize, const N: usize> Unpin for MatrixDistribution<D, T, M, N>
where D: Unpin, PhantomData<Matrix<T, M, N>>: Unpin,

§

impl<D, T, const M: usize, const N: usize> UnsafeUnpin for MatrixDistribution<D, T, M, N>

§

impl<D, T, const M: usize, const N: usize> UnwindSafe for MatrixDistribution<D, T, M, N>
where D: UnwindSafe, PhantomData<Matrix<T, M, N>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V