Trait rand::distributions::Sample
[-] [+]
[src]
pub trait Sample<Support> { fn sample<R: Rng>(&mut self, rng: &mut R) -> Support; }
Types that can be used to create a random instance of Support
.
Required Methods
fn sample<R: Rng>(&mut self, rng: &mut R) -> Support
Generate a random value of Support
, using rng
as the
source of randomness.
Implementors
impl<Sup: SampleRange> Sample<Sup> for Range<Sup>
impl Sample<f64> for Gamma
impl Sample<f64> for ChiSquared
impl Sample<f64> for FisherF
impl Sample<f64> for StudentT
impl Sample<f64> for Normal
impl Sample<f64> for LogNormal
impl Sample<f64> for Exp
impl<Sup: Rand> Sample<Sup> for RandSample<Sup>
impl<'a, T: Clone> Sample<T> for WeightedChoice<'a, T>