| 71 | |
| 72 | /*! |
| 73 | * \brief Read Data Matrix from an IT file |
| 74 | |
| 75 | The constructor creates an internal matrix \c Data from an IT++ file. The file is binary and can be made using the IT++ library or the Matlab/Octave function itsave. NB: the data are stored columnwise, i.e. each column contains the data for time \f$t\f$! |
| 76 | |
| 77 | */ |
| 78 | class ItppFileDS: public FileDS { |
| 79 | |
| 80 | public: |
| 81 | ItppFileDS ( const string &fname, const string &varname ) :FileDS() { |
| 82 | it_file it ( fname ); |
| 83 | it << Name ( varname ); |
| 84 | it >> Data; |
| 85 | time = 0; |
| 86 | //rowid and delays are ignored |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | /*! |
| 91 | * \brief CSV file data storage |
| 92 | The constructor creates \c Data matrix from the records in a CSV file \c fname. The orientation can be of two types: |
| 93 | 1. \c BY_COL which is default - the data are stored in columns; one column per time \f$t\f$, one row per data item. |
| 94 | 2. \c BY_ROW if the data are stored the classical CSV style. Then each column stores the values for data item, for ex. \f$[y_{t} y_{t-1} ...]\f$, one row for each discrete time instant. |
| 95 | |
| 96 | */ |
| 97 | class CsvFileDS: public FileDS { |
| 98 | |
| 99 | public: |
| 100 | //! Constructor - create DS from a CSV file. |
| 101 | CsvFileDS ( const string& fname, const string& orientation = "BY_COL" ); |
| 102 | }; |
| 103 | |
| 104 | |