Struct probability::prelude::Gamma [−][src]
A gamma distribution.
Implementations
impl Gamma
[src]
pub fn new(k: f64, theta: f64) -> Self
[src]
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]
Return the shape parameter.
pub fn theta(&self) -> f64
[src]
Return the scale parameter.
Trait Implementations
impl Clone for Gamma
[src]
impl Continuous for Gamma
[src]
impl Copy for Gamma
[src]
impl Debug for Gamma
[src]
impl Distribution for Gamma
[src]
impl Entropy for Gamma
[src]
impl Kurtosis for Gamma
[src]
impl Mean for Gamma
[src]
impl Modes for Gamma
[src]
impl Sample for Gamma
[src]
fn sample<S>(&self, source: &mut S) -> f64 where
S: Source,
[src]
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 Variance for Gamma
[src]
Auto Trait Implementations
impl RefUnwindSafe for Gamma
impl Send for Gamma
impl Sync for Gamma
impl Unpin for Gamma
impl UnwindSafe for Gamma
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,