mixpp: bdm::mratio Class Reference

bdm::mratio Class Reference

Class representing ratio of two densities. More...

#include <emix.h>

Inheritance diagram for bdm::mratio:

bdm::pdf bdm::root List of all members.

Public Member Functions

 mratio (const epdf *nom0, const RV &rv, bool copy=false)
double evallogcond (const vec &val, const vec &cond)
virtual vec samplecond (const vec &cond) NOT_IMPLEMENTED(0)
 Returns a sample from the density conditioned on cond, $x \sim epdf(rv|cond)$.
void ownnom ()
 Object takes ownership of nom and will destroy it.
 ~mratio ()
 Default destructor.

Protected Attributes

const epdfnom
 Nominator in the form of pdf.
shared_ptr< epdfden
 Denominator in the form of epdf.
bool destroynom
 flag for destructor
datalink_m2e dl
 datalink between conditional and nom

Detailed Description

Class representing ratio of two densities.

which arise e.g. by applying the Bayes rule. It represents density in the form:

\[ f(rv|rvc) = \frac{f(rv,rvc)}{f(rvc)} \]

where $ f(rvc) = \int f(rv,rvc) d\ rv $.

In particular this type of arise by conditioning of a mixture model.

At present the only supported operation is evallogcond().


Constructor & Destructor Documentation

bdm::mratio::mratio ( const epdf nom0,
const RV rv,
bool  copy = false 
) [inline]

Default constructor. By default, the given epdf is not copied! It is assumed that this function will be used only temporarily.


Member Function Documentation

virtual vec bdm::mratio::samplecond ( const vec &  cond  )  [virtual]

Returns a sample from the density conditioned on cond, $x \sim epdf(rv|cond)$.

Parameters:
cond is numeric value of rv

Implements bdm::pdf.


The documentation for this class was generated from the following file:
Generated on 2 Dec 2013 for mixpp by  doxygen 1.4.7