# bdm::stateDS Class Reference

List of all members.

## Public Member Functions
void | getdata (vec &dt0)
| Returns full vector of observed data=[output, input].
void | getdata (vec &dt0, const ivec &indices)
| Returns data records at indeces.
| stateDS (const shared_ptr< mpdf > &IM0, const shared_ptr< mpdf > &OM0, int usize)
virtual void | step ()
| Moves from to , i.e. perfroms the actions and reads response of the system.
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.
void | from_setting (const Setting &set)
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 RV | _drv () const
| access function
const RV & | _urv () const
| access function
virtual void | set_drv (const RV &drv, const RV &urv)
| set random rvariables
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.
virtual void | validate ()
| This method TODO.
## Protected Attributes
vec | dt
| result storage
vec | xt
| state storage
vec | ut
| input storage
int | L_xt
| Logger.
int | dtsize
int | utsize
RV | Drv
| Description of data returned by `getdata()`.
RV | Urv
| Description of data witten by by `write()`.
int | L_dt
| Remember its own index in Logger L.
int | L_ut

## Member Function Documentation

void stateDS::from_setting | ( | const Setting & | set | ) | `[virtual]`

UI for stateDS

The DS is constructed from a structure with fields:

            system = {
                    type = "stateDS";
                    //Internal model
                    IM = { type = "mpdf"; //<-- valid offspring! e.g. "mlnorm"
                            rv = { //description of x_t
                                    names=["name1",...];
                                    sizes=[2,1]; // optional default=[1,1...];
                                    times=[0,0]; // optional default=[0,0...];
                                    }
                            rvu= { //description of  u_t
                                    //optional default=empty
                                    }

                            // remaining fields depending on the chosen type
                            };
                    //Observation model
                    OM = { type = "mpdf-offspring";
                            rv = {}; //description of d_t
                            rvu = {type="internal", path="system.IM.rvu"}; //description of u_t

                            //remaining fields
                    }
            };

Reimplemented from bdm::root.

References dt, ut, and xt.

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

- datasources.h
- datasources.cpp