Struct compute::distributions::Beta[][src]

pub struct Beta { /* fields omitted */ }
Expand description

Implements the Beta distribution.

Implementations

Create a new Beta distribution with parameters alpha and beta.

Errors

Panics if alpha <= 0 or beta <= 0.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Calculates the probability density function for the given Beta function at x.

Remarks

Returns 0. if x is not in [0, 1]

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Samples from the given Beta distribution using the Gamma distribution.

Update the parameters of the distribution.

Generates a vector of n randomly sampled values from the given probability distribution.

Generates a matrix of size n x m with values randomly sampled from the given distribution. Read more

Returns the mean of the beta distribution, which for a B(a, b) distribution is given by a / (a + b).

Returns the variance of the beta distribution.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.