emix Class Reference

Mixture of epdfs. More...

#include <emix.h>

Inheritance diagram for emix:

Inheritance graph
[legend]
Collaboration diagram for emix:

Collaboration graph
[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 sampleN (int N) const
 Returns N samples from density $epdf(rv)$.
virtual double eval (const vec &val) const
 Compute probability of argument val.
RV_rv ()
 access function, possibly dangerous!

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:

\[ f(x) = \sum_{i=1}^{n} w_{i} f_i(x), \quad \sum_{i=1}^n w_i = 1. \]

where $f_i(x)$ is any density on random variable $x$, called component,


Member Function Documentation

vec emix::sample (  )  const [virtual]

Returns the required moment of the epdf.

Returns a sample, $x$ from density $epdf(rv)$

Implements epdf.

References Coms, and w.


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

Generated on Thu Sep 4 19:28:09 2008 for mixpp by  doxygen 1.5.6