Struct probability::distribution::Gamma [−][src]
pub struct Gamma { /* fields omitted */ }
A gamma distribution.
Methods
impl Gamma
[src]
impl Gamma
pub fn new(k: f64, theta: f64) -> Self
[src]
pub fn new(k: f64, theta: f64) -> Self
Create a gamma distribution with shape parameter k
and scale parameter
theta
.
It should hold that k > 0
and theta > 0
.
pub fn k(&self) -> f64
[src]
pub fn k(&self) -> f64
Return the shape parameter.
pub fn theta(&self) -> f64
[src]
pub fn theta(&self) -> f64
Return the scale parameter.
Trait Implementations
impl Clone for Gamma
[src]
impl Clone for Gamma
fn clone(&self) -> Gamma
[src]
fn clone(&self) -> Gamma
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Gamma
[src]
impl Copy for Gamma
impl Debug for Gamma
[src]
impl Debug for Gamma
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Continuous for Gamma
[src]
impl Continuous for Gamma
impl Distribution for Gamma
[src]
impl Distribution for Gamma
type Value = f64
The type of outcomes.
fn distribution(&self, x: f64) -> f64
[src]
fn distribution(&self, x: f64) -> f64
Compute the cumulative distribution function.
impl Entropy for Gamma
[src]
impl Entropy for Gamma
impl Kurtosis for Gamma
[src]
impl Kurtosis for Gamma
impl Mean for Gamma
[src]
impl Mean for Gamma
impl Modes for Gamma
[src]
impl Modes for Gamma
impl Sample for Gamma
[src]
impl Sample for Gamma
fn sample<S>(&self, source: &mut S) -> f64 where
S: Source,
[src]
fn sample<S>(&self, source: &mut S) -> f64 where
S: Source,
Draw a sample.
References
- 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 Skewness for Gamma
[src]
impl Skewness for Gamma
impl Variance for Gamma
[src]
impl Variance for Gamma