Changeset 1059
- Timestamp:
- 06/08/10 17:12:22 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/datasources.h
r1058 r1059 22 22 * \brief Memory storage of off-line data column-wise (used mostly in C++) 23 23 24 The data are stored in an internal matrix \c Data . E25 ach column of Data corresponds to one discrete time observation \f$t\f$.24 The data are stored in an internal matrix \c Data . 25 Each column of Data corresponds to one discrete time observation \f$t\f$. 26 26 27 27 */ … … 65 65 /*! Create object from the following structure 66 66 \code 67 class = "MemDS";68 Data = (...); %Data matrix or data vector69 70 time = 0; % Index of the first column to user_info,71 ... % fields from bdm::DS::from_setting67 class = 'MemDS'; 68 Data = [...]; // Data matrix or data vector 69 --- optional --- 70 time = 0; // Index of the first column in the matrix Data 71 --- fields from bdm::DS::from_setting --- 72 72 \endcode 73 73 74 74 If the optional fields are not given, they will be filled as follows: 75 75 \code 76 drv = {names=("ch0", "ch1", "ch2", ..."number_of_rows_of_Data"); 77 sizes=( 1 1 1 ...); 78 times=( 0 0 0 ...); 79 }; 76 drv.names=(""); 77 drv.sizes=( no_rows_Data ); 80 78 time = 0; 81 79 \endcode 82 80 If \c rowid is given, \c drv will be named after indices in rowids. 83 81 84 Hence the data provided by method \c getdata() will be full column of matrix Data starting from the first record.85 82 */ 86 83 void from_setting ( const Setting &set ); … … 92 89 /*! \brief Pseudovirtual class for reading data from files 93 90 91 Common predecessord to various file formats. 94 92 */ 95 93 class FileDS: public MemDS { … … 100 98 \code 101 99 filename = 'data_file.ext'; // name of the file where the data sare stored 102 the same as #bdm::DS100 --- fields from bdm::DS --- 103 101 \endcode 104 102 */ … … 127 125 }; 128 126 127 /*! 128 \code 129 class = 'ITppFileDS'; 130 filename = 'file_with_data.it'; 131 varname = 'Data1'; // Name of a variable in which are th data stored 132 \endcode 133 */ 129 134 void from_setting ( const Setting &set ); 130 135 … … 207 212 208 213 /*! \brief Simulate data from conditional density 209 Still having only one density but allowing conditioning on either input or delayed values. 214 215 Data are simulated by sampling from conditional pdf. 216 217 The condition can be of two types: 218 -# delayed output values: these are cached internally, initiated via \c init_rv and \c init_values. 219 -# input values: remaining RVs in the rvc of the given pdf are considered to be inputs and are declared as \c urv 220 221 Note: a classical state-space model can be simulated as an instance of this case since it can be seen as a chain rule on state-evolution pdf and observation pdf. See class bdm::mprod and other offsprings of pdf. 210 222 */ 211 223 class PdfDS : public DS {