KJB
kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc > Class Template Reference

A conditional distribution. More...

`#include <prob_conditional_distribution.h>`

## Public Types

typedef Distribution_traits
< TargetVariable >::type
target_type

typedef Distribution_traits
< GivenVariable >::type
given_type

## Public Member Functions

Conditional_distribution (DependenceFunc f)

Conditional_distribution (const Conditional_distribution &cd)

Conditional_distributionoperator= (const Conditional_distribution &cd)

TargetVariable get_distribution (const given_type &y) const
Gets the distribution when we fix the given variable; i.e., it applies the dependence function to y. More...

## Detailed Description

### template<class TargetVariable, class GivenVariable, class DependenceFunc> class kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >

A conditional distribution.

This class implements a general conditional distribution / random variable concept. Let p(x | y) be a conditional distribution, with x and y random variables. This class represents both p(x | y) and x | y. To use this class, we need to know the domain of x, the domain of y and how x depends on y.

Template Parameters
 TargetVariable The target random variable type; must comply with the KJB's Distribution concept. GivenVariable The given random variable type; must comply with the KJB's Distribution concept. DependenceFunc This says how the target depends on the given. Must be applicable (operator()-wise) to a (GivenVariable, type(GivenVariable)) pair.

## Member Typedef Documentation

template<class TargetVariable, class GivenVariable, class DependenceFunc>
 typedef Distribution_traits::type kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::given_type
template<class TargetVariable, class GivenVariable, class DependenceFunc>
 typedef Distribution_traits::type kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::target_type

## Constructor & Destructor Documentation

template<class TargetVariable, class GivenVariable, class DependenceFunc>
 kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::Conditional_distribution ( DependenceFunc f )
inline
template<class TargetVariable, class GivenVariable, class DependenceFunc>
 kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::Conditional_distribution ( const Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc > & cd )
inline

## Member Function Documentation

template<class TargetVariable, class GivenVariable, class DependenceFunc>
 TargetVariable kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::get_distribution ( const given_type & y ) const
inline

Gets the distribution when we fix the given variable; i.e., it applies the dependence function to y.

template<class TargetVariable, class GivenVariable, class DependenceFunc>
 Conditional_distribution& kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::operator= ( const Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc > & cd )
inline

The documentation for this class was generated from the following file: