Struct opensrdk_probability::distribution::valued::value_differentiable::ValueDifferentiableValuedDistribution
source · pub struct ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,{ /* private fields */ }Implementations
sourceimpl<D, T1, T2, U, F, G> ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, F, G> ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
pub fn new(
valued_distribution: ValuedDistribution<D, T1, T2, U, F>,
value_diff: G
) -> Self
Trait Implementations
sourceimpl<D, T1, T2, U, Rhs, URhs, F, G> BitAnd<Rhs> for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
Rhs: Distribution<Value = U, Condition = URhs>,
URhs: RandomVariable,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, Rhs, URhs, F, G> BitAnd<Rhs> for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
Rhs: Distribution<Value = U, Condition = URhs>,
URhs: RandomVariable,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
type Output = DependentJoint<ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>, Rhs, T2, U, URhs>
type Output = DependentJoint<ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>, Rhs, T2, U, URhs>
The resulting type after applying the
& operator.sourceimpl<D: Clone, T1: Clone, T2: Clone, U: Clone, F: Clone, G: Clone> Clone for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D: Clone, T1: Clone, T2: Clone, U: Clone, F: Clone, G: Clone> Clone for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
sourcefn clone(&self) -> ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>
fn clone(&self) -> ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<D, T1, T2, U, F, G> ConditionDifferentiableDistribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U> + ConditionDifferentiableDistribution,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, F, G> ConditionDifferentiableDistribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U> + ConditionDifferentiableDistribution,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
fn ln_diff_condition(
&self,
x: &Self::Value,
theta: &Self::Condition
) -> Result<Vec<f64>, DistributionError>
sourceimpl<D, T1, T2, U, F, G> Debug for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, F, G> Debug for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
sourceimpl<D, T1, T2, U, F, G> Distribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, F, G> Distribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
sourceimpl<D, T1, T2, U, Rhs, TRhs, F, G> Mul<Rhs> for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
Rhs: Distribution<Value = TRhs, Condition = U>,
TRhs: RandomVariable,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, Rhs, TRhs, F, G> Mul<Rhs> for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
Rhs: Distribution<Value = TRhs, Condition = U>,
TRhs: RandomVariable,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
type Output = IndependentJoint<ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>, Rhs, T2, TRhs, U>
type Output = IndependentJoint<ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>, Rhs, T2, TRhs, U>
The resulting type after applying the
* operator.sourceimpl<D, T1, T2, U, F, G> SampleableDistribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, F, G> SampleableDistribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U>,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
sourceimpl<D, T1, T2, U, F, G> ValueDifferentiableDistribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U> + ValueDifferentiableDistribution,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
impl<D, T1, T2, U, F, G> ValueDifferentiableDistribution for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Distribution<Value = T1, Condition = U> + ValueDifferentiableDistribution,
T1: RandomVariable,
T2: RandomVariable,
U: Event,
F: Fn(&T2) -> Result<T1, DistributionError> + Clone + Send + Sync,
G: Fn(&T2) -> Matrix + Clone + Send + Sync,
fn ln_diff_value(
&self,
x: &Self::Value,
theta: &Self::Condition
) -> Result<Vec<f64>, DistributionError>
Auto Trait Implementations
impl<D, T1, T2, U, F, G> RefUnwindSafe for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: RefUnwindSafe,
F: RefUnwindSafe,
G: RefUnwindSafe,
T2: RefUnwindSafe,
impl<D, T1, T2, U, F, G> Send for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>
impl<D, T1, T2, U, F, G> Sync for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>
impl<D, T1, T2, U, F, G> Unpin for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: Unpin,
F: Unpin,
G: Unpin,
T2: Unpin,
impl<D, T1, T2, U, F, G> UnwindSafe for ValueDifferentiableValuedDistribution<D, T1, T2, U, F, G>where
D: UnwindSafe,
F: UnwindSafe,
G: UnwindSafe,
T2: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more