#include <emix.h>
Public Member Functions | |
mprod (Array< mpdf * > mFacs, bool overlap=false) | |
Constructor from list of mFacs, Additional parameter overlap is left for future use. Do not set to true for mprod. | |
double | evalpdflog (const vec &val) const |
vec | samplecond (const vec &cond, double &ll) |
Returns the required moment of the epdf. | |
mat | samplecond (const vec &cond, vec &ll, int N) |
Returns. | |
virtual void | condition (const vec &cond) |
Update ep so that it represents this mpdf conditioned on rvc = cond. | |
virtual double | evalcond (const vec &dt, const vec &cond) |
Shortcut for conditioning and evaluation of the internal epdf. In some cases, this operation can be implemented efficiently. | |
RV | _rvc () |
access function | |
RV | _rv () |
access function | |
epdf & | _epdf () |
access function | |
Protected Attributes | |
int | n |
Array< epdf * > | epdfs |
Array< mpdf * > | mpdfs |
Array< ivec > | rvinds |
Indeces of rvs in common rv. | |
Array< ivec > | rvcinrv |
Indeces of rvc in common rv. | |
Array< ivec > | rvcinds |
Indeces of rvc in common rvc. | |
RV | rv |
modeled random variable | |
RV | rvc |
random variable in condition | |
epdf * | ep |
pointer to internal epdf |
Probability density in the form of Chain-rule decomposition: \[ f(x_1,x_2,x_3) = f(x_1|x_2,x_3)f(x_2,x_3)f(x_3) \] Note that
vec mprod::samplecond | ( | const vec & | cond, | |
double & | ll | |||
) | [inline, virtual] |
Returns the required moment of the epdf.
Returns a sample from the density conditioned on cond
, .
cond | is numeric value of rv | |
ll | is a return value of log-likelihood of the sample. |
Reimplemented from mpdf.
References RV::count(), mpdf::rv, rvcinds, rvcinrv, and rvinds.
Referenced by samplecond().
mat mprod::samplecond | ( | const vec & | cond, | |
vec & | ll, | |||
int | N | |||
) | [inline, virtual] |
Returns.
N | samples from the density conditioned on cond , . | |
cond | is numeric value of rv | |
ll | is a return value of log-likelihood of the sample. |
Reimplemented from mpdf.
References RV::count(), mpdf::rv, and samplecond().