# 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 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 | sample (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.

## Detailed Description

Mixture of epdfs.

Density function:

where is any density on random variable , called component,

## Member Function Documentation

vec emix::sample | ( |  | ) | const`[virtual]`

Returns the required moment of the epdf.

Returns a sample, from density

Implements epdf.

References Coms, and w.

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

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