pub struct Dirichlet<F>{ /* private fields */ }
Expand description
The Dirichlet distribution Dirichlet(alpha)
.
The Dirichlet distribution is a family of continuous multivariate probability distributions parameterized by a vector alpha of positive reals. It is a multivariate generalization of the beta distribution.
§Example
use rand::prelude::*;
use rand_distr::Dirichlet;
let dirichlet = Dirichlet::new(&[1.0, 2.0, 3.0]).unwrap();
let samples = dirichlet.sample(&mut rand::thread_rng());
println!("{:?} is from a Dirichlet([1.0, 2.0, 3.0]) distribution", samples);
Implementations§
Trait Implementations§
Source§impl<F> Clone for Dirichlet<F>where
F: Float + Clone,
StandardNormal: Distribution<F>,
Exp1: Distribution<F>,
Open01: Distribution<F>,
impl<F> Clone for Dirichlet<F>where
F: Float + Clone,
StandardNormal: Distribution<F>,
Exp1: Distribution<F>,
Open01: Distribution<F>,
Source§impl<F> Debug for Dirichlet<F>where
F: Float + Debug,
StandardNormal: Distribution<F>,
Exp1: Distribution<F>,
Open01: Distribution<F>,
impl<F> Debug for Dirichlet<F>where
F: Float + Debug,
StandardNormal: Distribution<F>,
Exp1: Distribution<F>,
Open01: Distribution<F>,
Source§impl<F> Distribution<Vec<F>> for Dirichlet<F>
impl<F> Distribution<Vec<F>> for Dirichlet<F>
Auto Trait Implementations§
impl<F> Freeze for Dirichlet<F>
impl<F> RefUnwindSafe for Dirichlet<F>where
F: RefUnwindSafe,
impl<F> Send for Dirichlet<F>where
F: Send,
impl<F> Sync for Dirichlet<F>where
F: Sync,
impl<F> Unpin for Dirichlet<F>
impl<F> UnwindSafe for Dirichlet<F>where
F: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes