#include <emix.h>


| Public Member Functions | |
| emix (RV &rv) | |
| Default constructor. | |
| void | set_parameters (const vec &w, const Array< epdf * > &Coms) | 
| Set weights wand componentsR. | |
| vec | sample () const | 
| Returns the required moment of the epdf. | |
| vec | mean () const | 
| return expected value | |
| double | evalpdflog (const vec &val) const | 
| Compute log-probability of argument val. | |
| vec & | _w () | 
| returns a pointer to the internal mean value. Use with Care! | |
| virtual mat | sampleN (int N) const | 
| Returns N samples from density  . | |
| virtual double | eval (const vec &val) const | 
| Compute probability of argument val. | |
| RV | _rv () const | 
| access function | |
| Protected Attributes | |
| vec | w | 
| weights of the components | |
| Array< epdf * > | Coms | 
| Component (epdfs). | |
| RV | rv | 
| Identified of the random variable. | |
Density function:
![\[ f(x) = \sum_{i=1}^{n} w_{i} f_i(x), \quad \sum_{i=1}^n w_i = 1. \]](form_63.png) 
 where  is any density on random variable
 is any density on random variable  , called component,
, called component, 
| vec emix::sample | ( | ) | const  [virtual] | 
 1.5.6
 1.5.6