Class prob_cond_mdim_indep (o2scl)

O2scl : Class List

template<class vec_t = boost::numeric::ublas::vector<double>>
class prob_cond_mdim_indep : public o2scl::prob_cond_mdim<boost::numeric::ublas::vector<double>>

A multi-dimensional conditional probability density function independent of the input.

The conditional probability, \( P(A|B) = P(A,B)/P(B) \). If the joint probability is factorizable because the events \( A \) and \( B \) are independent, i.e. \( P(A,B) = P(A) P(B) \), then \( P(A|B) = P(A) \) and is independent of \( B \). This class handles that particular case.

This class is experimental.

Public Functions

inline prob_cond_mdim_indep(prob_dens_mdim<vec_t> &out)

Create a conditional probability distribution based on the specified probability distribution.

inline prob_cond_mdim_indep(const prob_cond_mdim_indep &pcmi)

Copy constructor.

inline prob_cond_mdim_indep &operator=(const prob_cond_mdim_indep &pcmi)

Copy constructor with operator=.

inline virtual size_t dim() const

The dimensionality.

inline virtual double pdf(const vec_t &x_B, const vec_t &x_A) const

The conditional probability of x_A given x_B, i.e. \( P(A|B) \).

inline virtual double log_pdf(const vec_t &x_B, const vec_t &x_A) const

The log of the conditional probability of x_A given x_B i.e. \( \log [P(A|B)] \).

inline virtual void operator()(const vec_t &x_B, vec_t &x_A) const

Sample the distribution.

Protected Attributes

prob_dens_mdim<vec_t> &base