Trait probability::distribution::Sample[][src]

pub trait Sample: Distribution {
    fn sample<S>(&self, _: &mut S) -> Self::Value
    where
        S: Source
; }

A distribution capable of drawing samples.

Required methods

fn sample<S>(&self, _: &mut S) -> Self::Value where
    S: Source
[src]

Draw a sample.

Loading content...

Implementors

impl Sample for Bernoulli[src]

impl Sample for Beta[src]

impl Sample for Binomial[src]

impl Sample for Categorical[src]

impl Sample for Exponential[src]

impl Sample for Gamma[src]

fn sample<S>(&self, source: &mut S) -> f64 where
    S: Source
[src]

Draw a sample.

References

  1. G. Marsaglia and W. W. Tsang, “A simple method for generating gamma variables,” ACM Transactions on Mathematical Software, vol. 26, no. 3, pp. 363–372, September 2000.

impl Sample for Gaussian[src]

fn sample<S>(&self, source: &mut S) -> f64 where
    S: Source
[src]

Draw a sample.

References

  1. G. Marsaglia and W. W. Tsang, “The ziggurat method for generating random variables,” Journal of Statistical Software, vol. 5, no. 8, pp. 1–7, 10 2000.

  2. D. Eddelbuettel, “Ziggurat Revisited,” 2014.

impl Sample for Laplace[src]

impl Sample for Logistic[src]

impl Sample for Lognormal[src]

impl Sample for Pert[src]

impl Sample for Triangular[src]

impl Sample for Uniform[src]

Loading content...