Struct probability::distribution::Categorical[][src]

pub struct Categorical { /* fields omitted */ }

A categorical distribution.

Methods

impl Categorical
[src]

Create a categorical distribution with success probability p.

It should hold that p[i] >= 0, p[i] <= 1, and sum(p) == 1.

Return the number of categories.

Return the event probabilities.

Trait Implementations

impl Clone for Categorical
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Categorical
[src]

Formats the value using the given formatter. Read more

impl Discrete for Categorical
[src]

Compute the probability mass function.

impl Distribution for Categorical
[src]

The type of outcomes.

Compute the cumulative distribution function.

impl Entropy for Categorical
[src]

Compute the differential entropy. Read more

impl Inverse for Categorical
[src]

Compute the inverse of the cumulative distribution function.

impl Kurtosis for Categorical
[src]

Compute the excess kurtosis.

impl Mean for Categorical
[src]

Compute the expected value.

impl Median for Categorical
[src]

Compute the median.

impl Modes for Categorical
[src]

Compute the modes.

impl Sample for Categorical
[src]

Draw a sample.

impl Skewness for Categorical
[src]

Compute the skewness.

impl Variance for Categorical
[src]

Compute the variance.

Compute the standard deviation.

Auto Trait Implementations

impl Send for Categorical

impl Sync for Categorical