Changeset 1060 for library

Show
Ignore:
Timestamp:
06/08/10 17:12:52 (14 years ago)
Author:
smidl
Message:

doc

Location:
library/bdm
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/bdmbase.h

    r1058 r1060  
    12351235        } 
    12361236 
    1237         /*!  
     1237        /*! Create object from the following structure 
    12381238        \code 
    1239         drv  = bdm::RV::from_setting             // decription of observed data  
    1240         urv  = bdm::RV::from_setting             // decription of input data 
    1241         log_level = "logdt,logut"                // when set, both the simulated data and the inputs are stored to the logger 
    1242                                                  // By default both are on. It makes sense to switch them off for MemDS where the data are already stored. 
     1239        drv  = RV({"names",...},[..sizes..]);            % decription of observed data using bdm::RV::from_setting 
     1240        urv  = RV({"names",...},[..sizes..]);            % decription of input data using bdm::RV::from_setting 
     1241        log_level = 'logdt,logut';               % when set, both the simulated data and the inputs are stored to the logger 
     1242                                                 % By default both are on. It makes sense to switch them off e.g. for MemDS where the data are already stored. 
    12431243        \endcode 
    12441244        */ 
  • library/bdm/base/datasources.h

    r1059 r1060  
    6666        \code 
    6767        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 --- 
     68        Data = [...];               % Data matrix with records stored in columns 
     69        --- optional fields --- 
     70        time = 0;                   % Index of the first column in the matrix Data 
     71        --- inherited fields --- 
     72        bdm::DS::from_setting 
    7273        \endcode 
    7374 
    7475        If the optional fields are not given, they will be filled as follows: 
    7576        \code 
    76         drv.names=(""); 
    77         drv.sizes=( no_rows_Data ); 
     77        drv.names = { "" };                % empty name 
     78        drv.sizes = { no_rows_Data };      % full size of the record 
    7879        time = 0; 
    7980        \endcode 
    80         If \c rowid is given, \c drv will be named after indices in rowids. 
    8181 
    8282        */ 
     
    9595        string filename; 
    9696public: 
    97         /*! reads what DS::from_setting  
    98         \code 
    99         filename = 'data_file.ext';           // name of the file where the data sare stored 
    100         --- fields from bdm::DS --- 
     97        /*! Create object from the following structure 
     98        \code 
     99        filename = 'data_file.ext';           % name of the file where the data sare stored 
     100        --- inherited fields --- 
     101        bdm::DS::from_setting 
    101102        \endcode 
    102103        */ 
     
    125126        }; 
    126127 
    127         /*!  
     128        /*! Create object from the following structure 
    128129        \code 
    129130        class    = 'ITppFileDS';          
    130131        filename = 'file_with_data.it'; 
    131         varname  = 'Data1';                  // Name of a variable in which are th data stored 
     132        varname  = 'Data1';                  // Name of a variable in which the data are stored 
     133        --- inherited fields --- 
     134        bdm::DS::from_setting 
    132135        \endcode 
    133136        */ 
     
    143146 
    144147The constructor creates \c Data matrix from the records in a CSV file \c fname. The orientation can be of two types: 
    145 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. 
    146 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. 
     148 -# \c BY_COL which is default - the data are stored in columns; one column per time \f$t\f$, one row per data item. 
     149 -# \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. 
    147150 
    148151*/ 
    149152class CsvFileDS: public FileDS { 
    150153public: 
     154        /*! Create object from the following structure 
     155        \code  
     156        class = 'CsvFileDS'; 
     157        filename = 'file.csv'; 
     158        orientation = 'BY_ROW' or 'BY_COL';        % data records are stored in rows of columns (default). 
     159        --- inherited fields --- 
     160        bdm::DS::from_setting 
     161        \endcode 
     162        */ 
    151163        void from_setting ( const Setting & set ); 
    152164}; 
     
    187199        virtual void write ( const vec &ut, const ivec &indices ) NOT_IMPLEMENTED_VOID; 
    188200 
    189         /*! 
    190         \code 
    191         class = "EpdfDS"; 
    192         epdf = {class="epdf_offspring", ...}// uncondtitional density to sample from 
    193         \endcode 
    194  
     201        /*! Create object from the following structure 
     202        \code 
     203        class = 'EpdfDS'; 
     204        epdf = configuration of bdm::epdf        % unconditional density to sample from,  bdm::epdf::from_setting 
     205        \endcode 
     206        Does not inherit from bdm::DS::from_setting, names of data are taken from epdf.rv. 
    195207        */ 
    196208        void from_setting ( const Setting &set ) { 
     
    253265 
    254266 
    255         /*! 
    256         \code 
    257         class = "PdfDS"; 
    258         pdf = bdm::pdf::from_setting;          // pdf to simulate, any offspring of pdf 
     267        /*! Create object from the following structure 
     268        \code 
     269        class = 'PdfDS'; 
     270        pdf = configuration of bdm::pdf;          % any offspring of pdf, bdm::pdf::from_setting 
    259271        --- optional --- 
    260         init_rv = bdm::RV::from_setting;       // define what rv to initialize - typically delayed values! 
    261         init_values = [...];                   // vector of initial values corresponding to init_rv 
    262         \endcode 
    263  
     272        init_rv = RV({'names',...},[sizes,...],[times,...]);   % define what rv to initialize - typically delayed values, time=-1, etc.! 
     273        init_values = [...];                      % vector of initial values corresponding to init_rv 
     274        \endcode 
     275        Class does not inherits from bdm::DS::from_setting, names of data are taken from pdf.rv and pdf.rvc. 
     276         
    264277        If init_rv is not given, init_values are set to zero. 
    265278        */ 
  • library/bdm/mex/mex_datasource.h

    r1058 r1060  
    2828        mxArrayDS () : DS() {}; 
    2929 
    30         /*! \brief Create data source from mxArray 
     30        /*! Create object from the following structure 
    3131 
    3232        \code 
    3333        class   = 'mxArrayDS'; 
    34         varname = 'data_matrix';         // name of a workspace variable 
    35         drv     = {class='RV',...}       // names of data in columns 
     34        varname = 'data_matrix';                   % name of a Matlab workspace variable 
     35        -- inherited fields --- 
     36        bdm::DS::from_setting 
     37        drv     = RV({'names',...},[sizes,...]);   % names of data redords in columns 
    3638        \endcode 
    3739