bdm::EpdfDS Class Reference

Simulate data from a static pdf (epdf). More...

#include <datasources.h>

List of all members.

Public Member Functions

void step ()
 Moves from $ t $ to $ t+1 $, i.e. perfroms the actions and reads response of the system.
void getdata (vec &dt_out)
 Returns full vector of observed data=[output, input].
void getdata (vec &dt_out, const ivec &ids)
 Returns data records at indeces.
const RV_drv ()
void from_setting (const Setting &set)
void validate ()
 This method TODO.
virtual int max_length ()
 Returns maximum number of provided data, by default it is set to maximum allowed length, shorter DS should overload this method! See, MemDS.max_length().
virtual void write (vec &ut)
 Accepts action variable and schedule it for application.
virtual void write (vec &ut, const ivec &indeces)
 Accepts action variables at specific indeces.
virtual void log_add (logger &L)
 Register DS for logging into logger L.
virtual void logit (logger &L)
 Register DS for logging into logger L.
virtual const RV_drv () const
 access function
const RV_urv () const
 access function
const RV_yrv () const
 access function
virtual void set_drv (const RV &yrv, const RV &urv)
 set random variables
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.

Protected Attributes

shared_ptr< epdfiepdf
 internal pointer to epdf from which we samplecond
vec dt
 internal storage of data sample
int dtsize
 size of data returned by getdata()
int utsize
 size of data
int ytsize
 size of output
RV Drv
 Description of data returned by getdata().
RV Urv
 Description of data witten by by write().
RV Yrv
 Description of output data.
int L_dt
 Remember its own index in Logger L.
int L_ut

Detailed Description

Simulate data from a static pdf (epdf).

Trivial example of a data source, could be used for tests of some estimation algorithms. For example, simulating data from a mixture model and feeding them to mixture model estimators.


Member Function Documentation

void bdm::EpdfDS::from_setting ( const Setting &  set  )  [inline, virtual]
                class = "EpdfDS";
                epdf = {class="epdf_offspring", ...}// uncondtitional density to sample from

Reimplemented from bdm::root.

References bdm_assert, dt, bdm::DS::dtsize, iepdf, bdm::DS::set_drv(), and bdm::DS::utsize.


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

Generated on Sun Sep 13 22:40:42 2009 for mixpp by  doxygen 1.6.1