Trait opensrdk_probability::distribution::Distribution[][src]

pub trait Distribution {
    type T: RandomVariable;
    type U: RandomVariable;
    fn p(&self, x: &Self::T, theta: &Self::U) -> Result<f64, Box<dyn Error>>;
fn sample(
        &self,
        theta: &Self::U,
        rng: &mut StdRng
    ) -> Result<Self::T, Box<dyn Error>>; fn ln_p(&self, x: &Self::T, theta: &Self::U) -> Result<f64, Box<dyn Error>> { ... } }

Associated Types

Loading content...

Required methods

fn p(&self, x: &Self::T, theta: &Self::U) -> Result<f64, Box<dyn Error>>[src]

fn sample(
    &self,
    theta: &Self::U,
    rng: &mut StdRng
) -> Result<Self::T, Box<dyn Error>>
[src]

Loading content...

Provided methods

fn ln_p(&self, x: &Self::T, theta: &Self::U) -> Result<f64, Box<dyn Error>>[src]

Loading content...

Implementors

impl Distribution for Beta[src]

type T = f64

type U = BetaParams

impl Distribution for ChiSquared[src]

type T = f64

type U = ChiSquaredParams

impl Distribution for Exp[src]

type T = f64

type U = ExpParams

impl Distribution for FisherF[src]

type T = f64

type U = FisherFParams

impl Distribution for Gamma[src]

type T = f64

type U = GammaParams

impl Distribution for Dirichlet[src]

type T = Vec<f64>

type U = DirichletParams

impl Distribution for InverseWishart[src]

type T = Matrix

type U = InverseWishartParams

fn p(&self, x: &Self::T, theta: &Self::U) -> Result<f64, Box<dyn Error>>[src]

x must be cholesky decomposed

fn sample(
    &self,
    theta: &Self::U,
    rng: &mut StdRng
) -> Result<Self::T, Box<dyn Error>>
[src]

output is cholesky decomposed

impl Distribution for MultivariateNormal[src]

type T = Vec<f64>

type U = MultivariateNormalParams

impl Distribution for MultivariateStudentT[src]

type T = Vec<f64>

type U = MultivariateStudentTParams

impl Distribution for NormalInverseWishart[src]

type T = MultivariateNormalParams

type U = NormalInverseWishartParams

impl Distribution for Wishart[src]

type T = Matrix

type U = WishartParams

fn p(&self, x: &Self::T, theta: &Self::U) -> Result<f64, Box<dyn Error>>[src]

x must be cholesky decomposed

fn sample(
    &self,
    theta: &Self::U,
    rng: &mut StdRng
) -> Result<Self::T, Box<dyn Error>>
[src]

output is cholesky decomposed

impl Distribution for Normal[src]

type T = f64

type U = NormalParams

impl Distribution for StudentT[src]

type T = f64

type U = StudentTParams

impl Distribution for Binominal[src]

type T = u64

type U = BinominalParams

impl Distribution for Geometric[src]

type T = u64

type U = GeometricParams

impl Distribution for Poisson[src]

type T = u64

type U = PoissonParams

impl Distribution for ChineseRestaurantDP[src]

type T = u64

type U = ChineseRestaurantDPParams

impl<'a, T, U> Distribution for InstantDistribution<'a, T, U> where
    T: RandomVariable,
    U: RandomVariable
[src]

type T = T

type U = U

impl<D, T1, T2, U> Distribution for ConvertedDistribution<D, T1, T2, U> where
    D: Distribution<T = T1, U = U>,
    T1: RandomVariable,
    T2: RandomVariable,
    U: RandomVariable
[src]

type T = T2

type U = U

impl<D, T, U> Distribution for IndependentArrayJoint<D, T, U> where
    D: Distribution<T = T, U = U>,
    T: RandomVariable,
    U: RandomVariable
[src]

type T = Vec<T>

type U = U

impl<G, K, T> Distribution for StudentTP<G, K, T> where
    G: GaussianProcess<K, T>,
    K: Kernel<T>,
    T: RandomVariable
[src]

type T = Vec<f64>

type U = StudentTPParams<T>

impl<K, T> Distribution for ExactGP<K, T> where
    K: Kernel<T>,
    T: RandomVariable
[src]

type T = Vec<f64>

type U = GaussianProcessParams<T>

impl<K, T> Distribution for KissLoveGP<K, T> where
    K: Kernel<Vec<f64>>,
    T: Convolutable + PartialEq
[src]

type T = Vec<f64>

type U = GaussianProcessParams<T>

impl<L, R, T, UL, UR> Distribution for DependentJoint<L, R, T, UL, UR> where
    L: Distribution<T = T, U = UL>,
    R: Distribution<T = UL, U = UR>,
    T: RandomVariable,
    UL: RandomVariable,
    UR: RandomVariable
[src]

type T = (T, UL)

type U = UR

impl<L, R, TL, TR, U> Distribution for IndependentJoint<L, R, TL, TR, U> where
    L: Distribution<T = TL, U = U>,
    R: Distribution<T = TR, U = U>,
    TL: RandomVariable,
    TR: RandomVariable,
    U: RandomVariable
[src]

type T = (TL, TR)

type U = U

impl<T> Distribution for Constant<T> where
    T: RandomVariable
[src]

type T = T

type U = ()

Loading content...