# bdm::MpdfDS Class Reference

Simulate data from conditional density Still having only one density but allowing conditioning on either input or delayed values. More...

## Detailed Description

Simulate data from conditional density Still having only one density but allowing conditioning on either input or delayed values.

`#include <datasources.h>`

List of all members.

## Public Member Functions
void | step ()
| Moves from to , 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 | write (const vec &ut0)
| Accepts action variable and schedule it for application.
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 | getdata (vec &dt, const ivec &indeces)
| Returns data records at indeces.
virtual void | write (const 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< mpdf > | impdf
| internal pointer to epdf from which we samplecond
vec | yt
| internal storage of data sample
vec | ut
| input vector
datalink_buffered | ut2rgr
| datalink between ut and regressor
datalink_buffered | yt2rgr
| datalink between yt and regressor
vec | rgr
| numeric values of regressor
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.
ivec | LIDs
| Remember its own index in Logger L, [0=dt, 1=ut].

## Member Function Documentation

void bdm::MpdfDS::from_setting | ( | const Setting & | set | ) | `[inline, virtual]`

                    class = "MpdfDS";
                    mpdf = {class="mpdf_offspring", ...};  // mpdf to simulate
                    --- optional ---
                    init_rv = {class="RV",names=...};      // define what rv to initialize - typically delayed values!
                    init_values = [...];                   // vector of initial values corresponding to init_rv

If init_rv is not given, init_values are set to zero.

Reimplemented from bdm::root.

References bdm::RV::_dsize(), bdm_error, bdm::DS::dtsize, bdm::UI::get(), impdf, rgr, bdm::datalink_buffered::set_connection(), bdm::DS::set_drv(), bdm::datalink_buffered::set_history(), bdm::RV::subt(), bdm::DS::Urv, ut, ut2rgr, bdm::DS::utsize, validate(), bdm::DS::Yrv, yt, yt2rgr, and bdm::DS::ytsize.

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

- datasources.h