[][src]Struct rand_array_iid::IIDDistr

pub struct IIDDistr<D> { /* fields omitted */ }

A distribution on arrays whose elements are i.i.d. with distribution D.

See crate-level documentation for more information.

Implementations

impl<D> IIDDistr<D>[src]

pub const fn new(d: D) -> Self[src]

Create an i.i.d. distribution, where each array element is distributed according to D.

Examples

let distr = IIDDistr::new(StandardNormal);
let mut rng = rand::thread_rng();
// Each of x element is distributed according to StandardNormal
let x : [f64; 10] = distr.sample(&mut rng);

Trait Implementations

impl<D: Clone> Clone for IIDDistr<D>[src]

impl<D: Copy> Copy for IIDDistr<D>[src]

impl<D: Debug> Debug for IIDDistr<D>[src]

impl<D: Default> Default for IIDDistr<D>[src]

impl<D, T> Distribution<[T; 0]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 1]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 10]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 11]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 12]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 13]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 14]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 15]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 16]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 17]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 18]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 19]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 2]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 20]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 21]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 22]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 23]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 24]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 25]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 26]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 27]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 28]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 29]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 3]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 30]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 31]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 4]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 5]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 6]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 7]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 8]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D, T> Distribution<[T; 9]> for IIDDistr<D> where
    D: Distribution<T>,
    T: Sized
[src]

impl<D: Eq> Eq for IIDDistr<D>[src]

impl<D: Hash> Hash for IIDDistr<D>[src]

impl<D: PartialEq> PartialEq<IIDDistr<D>> for IIDDistr<D>[src]

impl<D> StructuralEq for IIDDistr<D>[src]

impl<D> StructuralPartialEq for IIDDistr<D>[src]

Auto Trait Implementations

impl<D> RefUnwindSafe for IIDDistr<D> where
    D: RefUnwindSafe

impl<D> Send for IIDDistr<D> where
    D: Send

impl<D> Sync for IIDDistr<D> where
    D: Sync

impl<D> Unpin for IIDDistr<D> where
    D: Unpin

impl<D> UnwindSafe for IIDDistr<D> where
    D: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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