KJB
|
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_distribution & | operator= (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... | |
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.
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. |
typedef Distribution_traits<GivenVariable>::type kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::given_type |
typedef Distribution_traits<TargetVariable>::type kjb::Conditional_distribution< TargetVariable, GivenVariable, DependenceFunc >::target_type |
|
inline |
|
inline |
|
inline |
Gets the distribution when we fix the given variable; i.e., it applies the dependence function to y.
|
inline |