# bdm::DS Class Reference

Abstract class for discrete-time sources of data. More...

`#include <bdmbase.h>`

List of all members.

## Public Member Functions
| DS ()
| default constructors
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)
| Returns full vector of observed data=[output, input].
virtual void | getdata (vec &dt, const ivec &indeces)
| Returns data records at indeces.
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 | 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 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 | from_setting (const Setting &set)
| This method arrange instance properties according the data stored in the Setting structure.
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
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

Abstract class for discrete-time sources of data.

The class abstracts operations of:

- data aquisition,
- data-preprocessing, such as scaling of data,
- data resampling from the task of estimation and control. Moreover, for controlled systems, it is able to receive the desired control action and perform it in the next step. (Or as soon as possible).

The DataSource has three main data interaction structures:

- input, ,
- output ,
- data, a collection of all inputs and outputs and possibly some internal variables too.

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

- bdmbase.h