# bdm::mxArrayDS Class Reference

Memory storage of off-line data column-wise. More...

## Detailed Description

Memory storage of off-line data column-wise.

The data are stored in an internal matrix `Data` . Each column of Data corresponds to one discrete time observation . Access to this matrix is via indices `rowid` and `delays`.

The data can be loaded from a file.

`#include <mex_datasource.h>`

List of all members.

## Public Member Functions
| mxArrayDS ()
| Default constructor.
void | from_setting (const Setting &set)
| Create memory data source from mxArray.
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().
void | getdata (vec &dt)
| Returns full vector of observed data=[output, input].
void | getdata (vec &dt, const ivec &indeces)
| Returns data records at indeces.
void | set_drv (const RV &drv, const RV &urv)
| set random variables
void | write (const vec &ut)
| Accepts action variable and schedule it for application.
void | write (const vec &ut, const ivec &indices)
| Accepts action variables at specific indeces.
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.
virtual const RV & | _drv () const
| access function
const RV & | _urv () const
| access function
const RV & | _yrv () const
| access function
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
mat | Data
| internal matrix of data
int | time
| active column in the Data matrix
ivec | rowid
| vector of rows that are presented in Dt
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::mxArrayDS::from_setting | ( | const Setting & | set | ) | `[inline, virtual]`

Create memory data source from mxArray.

            system={
                    type="mexDS";
                    varname="";                // name of workspace variable
                    row_rv = {class='RV',...}  // definition of
                    };

MemDS with the above fields will be created;

Reimplemented from bdm::MemDS.

References bdm::MemDS::Data, bdm::DS::dtsize, bdm::MemDS::rowid, bdm::MemDS::set_drv(), and bdm::DS::utsize.

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

- mex_datasource.h