Struct opensrdk_probability::distribution::conditioned::condition_differentiable::ConditionDifferentiableConditionedDistribution
source · pub struct ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,{ /* private fields */ }Implementations
sourceimpl<D, T, U1, U2, F, G> ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, F, G> ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
pub fn new(
conditioned_distribution: ConditionedDistribution<D, T, U1, U2, F>,
condition_diff: G
) -> Self
Trait Implementations
sourceimpl<D, T, U1, U2, Rhs, URhs, F, G> BitAnd<Rhs> for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
Rhs: Distribution<Value = U2, Condition = URhs>,
URhs: RandomVariable,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, Rhs, URhs, F, G> BitAnd<Rhs> for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
Rhs: Distribution<Value = U2, Condition = URhs>,
URhs: RandomVariable,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
type Output = DependentJoint<ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>, Rhs, T, U2, URhs>
type Output = DependentJoint<ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>, Rhs, T, U2, URhs>
The resulting type after applying the
& operator.sourceimpl<D: Clone, T: Clone, U1: Clone, U2: Clone, F: Clone, G: Clone> Clone for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D: Clone, T: Clone, U1: Clone, U2: Clone, F: Clone, G: Clone> Clone for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
sourcefn clone(
&self
) -> ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>
fn clone(
&self
) -> ConditionDifferentiableConditionedDistribution<D, T, U1, U2, 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, T, U1, U2, F, G> ConditionDifferentiableDistribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1> + ConditionDifferentiableDistribution,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, F, G> ConditionDifferentiableDistribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1> + ConditionDifferentiableDistribution,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
fn ln_diff_condition(
&self,
x: &Self::Value,
theta: &Self::Condition
) -> Result<Vec<f64>, DistributionError>
sourceimpl<D, T, U1, U2, F, G> Debug for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, F, G> Debug for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
sourceimpl<D, T, U1, U2, F, G> Distribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, F, G> Distribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
sourceimpl<D, T, U1, U2, Rhs, TRhs, F, G> Mul<Rhs> for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
Rhs: Distribution<Value = TRhs, Condition = U2>,
TRhs: RandomVariable,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, Rhs, TRhs, F, G> Mul<Rhs> for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
Rhs: Distribution<Value = TRhs, Condition = U2>,
TRhs: RandomVariable,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
type Output = IndependentJoint<ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>, Rhs, T, TRhs, U2>
type Output = IndependentJoint<ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>, Rhs, T, TRhs, U2>
The resulting type after applying the
* operator.sourceimpl<D, T, U1, U2, F, G> SampleableDistribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: SampleableDistribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, F, G> SampleableDistribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: SampleableDistribution<Value = T, Condition = U1>,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
sourceimpl<D, T, U1, U2, F, G> ValueDifferentiableDistribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1> + ValueDifferentiableDistribution,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
impl<D, T, U1, U2, F, G> ValueDifferentiableDistribution for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Distribution<Value = T, Condition = U1> + ValueDifferentiableDistribution,
T: RandomVariable,
U1: Event,
U2: Event,
F: Fn(&U2) -> Result<U1, DistributionError> + Clone + Send + Sync,
G: Fn(&U2) -> Matrix + Clone + Send + Sync,
fn ln_diff_value(
&self,
x: &Self::Value,
theta: &Self::Condition
) -> Result<Vec<f64>, DistributionError>
Auto Trait Implementations
impl<D, T, U1, U2, F, G> RefUnwindSafe for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: RefUnwindSafe,
F: RefUnwindSafe,
G: RefUnwindSafe,
U2: RefUnwindSafe,
impl<D, T, U1, U2, F, G> Send for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>
impl<D, T, U1, U2, F, G> Sync for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>
impl<D, T, U1, U2, F, G> Unpin for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: Unpin,
F: Unpin,
G: Unpin,
U2: Unpin,
impl<D, T, U1, U2, F, G> UnwindSafe for ConditionDifferentiableConditionedDistribution<D, T, U1, U2, F, G>where
D: UnwindSafe,
F: UnwindSafe,
G: UnwindSafe,
U2: 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