| 114 | /*! \brief Abstract class for discrete-time sources of data. |
| 115 | |
| 116 | The class abstracts operations of: (i) data aquisition, (ii) data-preprocessing, (iii) scaling of data, and (iv) data resampling from the task of estimation and control. |
| 117 | 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). |
| 118 | |
| 119 | */ |
| 120 | class DS { |
| 121 | //!Observed variables, returned by \c getdata(). |
| 122 | RV Drv; |
| 123 | //!Action variables, accepted by \c write(). |
| 124 | RV Urv; // |
| 125 | public: |
| 126 | //! Returns full vector of observed data |
| 127 | void getdata(vec &dt); |
| 128 | //! Returns data records at indeces. |
| 129 | void getdata(vec &dt, ivec &indeces); |
| 130 | //! Accepts action variable and schedule it for application. |
| 131 | void write(vec &ut); |
| 132 | //! Accepts action variables at specific indeces |
| 133 | void write(vec &ut, ivec &indeces); |
| 134 | /*! \brief Method that assigns random variables to the datasource. |
| 135 | Typically, the datasource will be constructed without knowledge of random variables. This method will associate existing variables with RVs. |
| 136 | |
| 137 | (Inherited from m3k, may be deprecated soon). |
| 138 | */ |
| 139 | void linkrvs(RV &drv, RV &urv); |
| 140 | |
| 141 | //! Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system. |
| 142 | void step(); |
| 143 | }; |