pub trait RandomVariable: Clone + Debug + Send + Sync {
    type RestoreInfo: Eq;

    // Required methods
    fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo);
    fn len(&self) -> usize;
    fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>; }

Required Associated Types§

Required Methods§

source

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source

fn len(&self) -> usize

source

fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>

Implementations on Foreign Types§

source§

impl RandomVariable for ()

§

type RestoreInfo = ()

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(v: &[f64], _: &Self::RestoreInfo) -> Result<Self, DistributionError>

source§

impl RandomVariable for f64

§

type RestoreInfo = ()

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(v: &[f64], _: &Self::RestoreInfo) -> Result<Self, DistributionError>

source§

impl RandomVariable for u64

§

type RestoreInfo = u64

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>

source§

impl RandomVariable for usize

§

type RestoreInfo = usize

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>

source§

impl RandomVariable for bool

§

type RestoreInfo = bool

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>

source§

impl RandomVariable for Matrix

§

type RestoreInfo = usize

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>

source§

impl RandomVariable for PPTRF

§

type RestoreInfo = usize

source§

fn transform_vec(&self) -> (Vec<f64>, Self::RestoreInfo)

source§

fn len(&self) -> usize

source§

fn restore(
v: &[f64],
info: &Self::RestoreInfo
) -> Result<Self, DistributionError>

source§

impl<T, U> RandomVariable for (T, U)where
T: RandomVariable,
U: RandomVariable,

source§

impl<T> RandomVariable for Vec<T>where
T: RandomVariable,

Implementors§

source§

impl RandomVariable for PitmanYorGibbsSample

source§

impl RandomVariable for DirichletParams

source§

impl RandomVariable for BetaParams

source§

impl RandomVariable for CauchyParams

source§

impl RandomVariable for NormalParams

source§

impl RandomVariable for ExactEllipticalParams

source§

impl RandomVariable for ExactMultivariateStudentTParams

source§

impl RandomVariable for StudentTParams

source§

impl RandomVariable for ExpParams

source§

impl RandomVariable for FisherFParams

source§

impl RandomVariable for InverseWishartParams

source§

impl RandomVariable for NormalInverseWishartParams

source§

impl RandomVariable for WishartParams

source§

impl RandomVariable for ChiSquaredParams

source§

impl RandomVariable for GammaParams

source§

impl RandomVariable for GeometricParams

source§

impl RandomVariable for BernoulliParams

source§

impl RandomVariable for CategoricalParams

source§

impl RandomVariable for BinomialParams

source§

impl RandomVariable for MultinomialParams

source§

impl RandomVariable for PoissonParams

source§

impl RandomVariable for StickBreakingProcessParams

source§

impl<'a, G0, TH> RandomVariable for PitmanYorGibbsParams<'a, G0, TH>where
G0: Distribution<Value = TH, Condition = ()>,
TH: RandomVariable,

source§

impl<K, T> RandomVariable for ExactEllipticalProcessParams<K, T>where
K: PositiveDefiniteKernel<T>,
T: RandomVariable,

source§

impl<K, T> RandomVariable for KissLoveEllipticalProcessParams<K, T>where
K: PositiveDefiniteKernel<Vec<f64>>,
T: RandomVariable + Convolutable,

source§

impl<K, T> RandomVariable for SparseEllipticalProcessParams<K, T>where
K: PositiveDefiniteKernel<T>,
T: RandomVariable,