bdm::mlnorm< sq_T, TEpdf > Class Template Reference

Normal distributed linear function with linear function of mean value;. More...


Detailed Description

template<class sq_T, template< typename > class TEpdf = enorm>
class bdm::mlnorm< sq_T, TEpdf >

Normal distributed linear function with linear function of mean value;.

Mean value $ \mu=A*\mbox{rvc}+\mu_0 $.

#include <exp_family.h>

List of all members.

Public Member Functions

void condition (const vec &cond)
const vec & _mu_const () const
 access function
const mat & _A () const
 access function
mat _R () const
 access function
void from_setting (const Setting &set)
void validate ()
 This method TODO.
TEpdf< sq_T > & e ()
 access function to iepdf
vec samplecond (const vec &cond)
 Reimplements samplecond using condition().
double evallogcond (const vec &val, const vec &cond)
 Reimplements evallogcond using condition().
virtual vec evallogcond_m (const mat &Dt, const vec &cond)
 Efficient version of evallogcond for matrices.
virtual vec evallogcond_m (const Array< vec > &Dt, const vec &cond)
 Efficient version of evallogcond for Array<vec>.
virtual mat samplecond_m (const vec &cond, int N)
 Efficient version of samplecond.
virtual string to_string ()
 This method returns a basic info about the current instance.
virtual void to_setting (Setting &set) const
 This method save all the instance properties into the Setting structure.
Constructors



 mlnorm ()
 mlnorm (const mat &A, const vec &mu0, const sq_T &R)
void set_parameters (const mat &A0, const vec &mu0, const sq_T &R0)
 Set A and R.
Access to attributes



const RV_rv () const
const RV_rvc () const
int dimension () const
int dimensionc ()
Connection to other objects



void set_rvc (const RV &rvc0)
void set_rv (const RV &rv0)
bool isnamed ()

Protected Member Functions

void set_ep (epdf &iepdf)
 set internal pointer ep to point to given iepdf
void set_ep (epdf *iepdfp)
 set internal pointer ep to point to given iepdf

Protected Attributes

mat A
 Internal epdf that arise by conditioning on rvc.
vec mu_const
 Constant additive term.
TEpdf< sq_T > iepdf
 Internal epdf used for sampling.
int dimc
 dimension of the condition
RV rvc
 random variable in condition

Friends

template<typename sq_M >
std::ostream & operator<< (std::ostream &os, mlnorm< sq_M, enorm > &ml)
 Debug stream.

Member Function Documentation

template<class sq_T, template< typename > class TEpdf = enorm>
void bdm::mlnorm< sq_T, TEpdf >::condition ( const vec &  cond  )  [inline, virtual]

Set value of rvc . Result of this operation is stored in epdf use function _ep to access it.

Reimplemented from bdm::mpdf_internal< TEpdf< sq_T > >.

Reimplemented in bdm::mlstudent.

template<class sq_T, template< typename > class TEpdf = enorm>
void bdm::mlnorm< sq_T, TEpdf >::from_setting ( const Setting &  set  )  [inline, virtual]

Create Normal density with linear function of mean value

\[ f(rv|rvc) = N(A*rvc+const, R) \]

from structure

                class = 'mlnorm<ldmat>', (OR) 'mlnorm<chmat>', (OR) 'mlnorm<fsqmat>';
                A     = [];                  // matrix or vector of appropriate dimension
                const = [];                  // vector of constant term
                R     = [];                  // square matrix of appropriate dimension

Reimplemented from bdm::mpdf.

Referenced by bdm::mlnorm< chmat >::from_setting().


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

Generated on Wed Sep 16 22:33:34 2009 for mixpp by  doxygen 1.6.1