# bdm::ArxDS Class Reference

Generator of ARX data. More...

## Detailed Description

Generator of ARX data.

Deprecated:
  Use MpdfDS

`#include <datasources.h>`

List of all members.

## Public Member Functions
void | getdata (vec &dt)
| Returns full vector of observed data=[output, input].
void | getdata (vec &dt, const ivec &indices)
| Returns data records at indeces.
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.
| ArxDS ()
| Default constructor.
void | set_parameters (const mat &Th0, const vec mu0, const chmat &sqR0)
| Set parameters of the internal model, H is maximum time delay.
void | set_drv (const RV &yrv, const RV &urv, const RV &rrv)
| Set.
void | set_options (const string &s)
| set options from a string
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 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 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.
virtual void | validate ()
| This method TODO.
## Protected Attributes
RV | Rrv
| Rv of the regressor.
vec | H
| History, ordered as .
vec | U
| (future) input
vec | rgr
| temporary variable for regressor
datalink | rgrlnk
| data link: H -> rgr
mlnorm< chmat > | model
| model of Y - linear Gaussian
bool | opt_L_theta
| options
int | L_theta
| loggers
int | L_R
int | dt_size
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 ArxDS::from_setting | ( | const Setting & | set | ) | `[virtual]`

UI for ArxDS using factorized description!

The ArxDS is constructed from a structure with fields:

                    system = {
                            type = "ArxDS";
                            // description of y variables
                            y = {type="rv"; names=["y", "u"];};
                            // description of u variable
                            u = {type="rv"; names=[];}
                            // description of regressor
                            rgr = {type="rv";
                                    names = ["y","y","y","u"];
                                    times = [-1, -2, -3, -1];
                            }

                            // theta
                            theta = [0.8, -0.3, 0.4, 1.0,
                                             0.0, 0.0, 0.0, 0.0];
                            // offset (optional)
                            offset = [0.0, 0.0];
                            //variance
                            r = [0.1, 0.0,
                                     0.0, 1.0];
                            //options: L_theta = log value of theta,
                            opt = "L_theta";
                    };

Result is ARX data source offering with full history as Drv.

Reimplemented from bdm::root.

References bdm::UI::get(), set_drv(), set_options(), and set_parameters().

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

- datasources.h
- datasources.cpp