# emix Class Reference

Mixture of epdfs. More...

`#include <emix.h>`

Inheritance diagram for emix:

[legend]
Collaboration diagram for emix:

[legend]

List of all members.

## Public Member Functions
| emix (RV &rv)
| Default constructor.
void | set_parameters (const vec &w, const Array< epdf * > &Coms)
| Set weights `w` and components `R`.
vec | sample () const
| Returns a sample, from density .
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`.
virtual vec | evalpdflog (const mat &Val) const
| Compute log-probability of multiple values argument `val`.
const RV & | _rv () const
| access function, possibly dangerous!
void | _renewrv (const RV &in_rv)
| modifier function - useful when copying epdfs
## Protected Attributes
vec | w
| weights of the components
Array< epdf * > | Coms
| Component (epdfs).
RV | rv
| Identified of the random variable.

## Detailed Description

Mixture of epdfs.

Density function:

where is any density on random variable , called component,

The documentation for this class was generated from the following files:

- work/git/mixpp/bdm/stat/emix.h
- work/git/mixpp/bdm/stat/emix.cpp