[][src]Struct rstat::Mixture

pub struct Mixture<C: Distribution> {
    pub dist: Categorical,
    pub components: Vec<C>,
    // some fields omitted
}

Fields

dist: Categoricalcomponents: Vec<C>

Methods

impl<C: Distribution> Mixture<C> where
    C::Support: Enclose
[src]

pub fn new<T: Into<Categorical>>(prior: T, components: Vec<C>) -> Mixture<C>[src]

pub fn homogeneous(components: Vec<C>) -> Mixture<C>[src]

impl<C: Distribution> Mixture<C>[src]

pub fn n_components(&self) -> usize[src]

Trait Implementations

impl<C: Distribution> Distribution for Mixture<C> where
    C::Support: Clone
[src]

type Support = C::Support

fn ccdf(&self, x: <Self::Support as Space>::Value) -> Probability[src]

Evaluates the complementary cumulative distribution function at x. Read more

fn logcdf(&self, x: <Self::Support as Space>::Value) -> f64[src]

Evaluates the log CDF at x: ln F(x).

fn logccdf(&self, x: <Self::Support as Space>::Value) -> f64[src]

Evaluates the log complementary CDF at x: ln (1 - F(x)).

fn cdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]

Evaluates the CDF element-wise for a batch xs.

fn ccdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]

Evaluates the complementary CDF element-wise for a batch xs.

fn logcdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]

Evaluates the log CDF element-wise for a batch xs.

fn logccdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]

Evaluates the log complementary CDF element-wise for a batch xs.

fn sample_n<D, Sh, R: ?Sized>(
    &self,
    rng: &mut R,
    shape: Sh
) -> Array<<Self::Support as Space>::Value, D> where
    D: Dimension,
    Sh: ShapeBuilder<Dim = D>,
    R: Rng
[src]

Important traits for Sampler<D, R>
fn sample_iter<R>(self, rng: R) -> Sampler<Self, R> where
    Self: Sized,
    R: Rng
[src]

impl<C: ContinuousDistribution> ContinuousDistribution for Mixture<C> where
    C::Support: Clone,
    <C::Support as Space>::Value: Clone
[src]

fn logpdf(&self, x: <Self::Support as Space>::Value) -> f64[src]

Evaluates the log PDF at x.

fn pdf_batch(&self, xs: Vector<<Self::Support as Space>::Value>) -> Vector<f64>[src]

Evaluates the PDF element-wise for a batch xs.

fn logpdf_batch(
    &self,
    xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]

Evaluates the log PDF element-wise for a batch xs.

fn loglikelihood(&self, xs: Vector<<Self::Support as Space>::Value>) -> f64[src]

impl<C: UnivariateMoments> UnivariateMoments for Mixture<C> where
    C::Support: Clone
[src]

fn standard_deviation(&self) -> f64[src]

Computes the standard deviation of the distribution.

fn excess_kurtosis(&self) -> f64[src]

Computes the excess kurtosis of the distribution.

impl<C: Clone + Distribution> Clone for Mixture<C> where
    C::Support: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<C: Debug + Distribution> Debug for Mixture<C> where
    C::Support: Debug
[src]

Auto Trait Implementations

impl<C> Send for Mixture<C> where
    C: Send,
    <C as Distribution>::Support: Send

impl<C> Sync for Mixture<C> where
    C: Sync,
    <C as Distribution>::Support: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]