Changeset 796
- Timestamp:
- 01/29/10 19:56:45 (15 years ago)
- Files:
-
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/epdf_mean.cpp
r756 r796 28 28 shared_ptr<epdf> ep=UI::build<epdf>(Cfg); 29 29 30 31 if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 32 output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 33 vec2mxArray(ep->mean(), output[0]); 30 if (ep){ 31 //if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 32 output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 33 vec2mxArray(ep->mean(), output[0]); 34 } else { 35 mexErrMsgTxt ( "Given object is not epdf" ); 36 } 34 37 } 35 38 #endif -
applications/bdmtoolbox/mex/epdf_variance.cpp
r761 r796 27 27 28 28 shared_ptr<epdf> ep=UI::build<epdf>(Cfg); 29 30 if (ep) { 31 output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL); 32 vec2mxArray(ep->variance(), output[0]); 33 } else { 34 mexErrMsgTxt ( "Given object is not epdf" ); 35 } 29 36 30 31 if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" );32 output[0] = mxCreateDoubleMatrix(ep->dimension(), 1, mxREAL);33 vec2mxArray(ep->variance(), output[0]);34 37 } 35 38 #endif -
library/bdm/estim/arx.cpp
r766 r796 256 256 } 257 257 258 double frg; 259 if ( !UI::get ( frg, set, "frg" ) ) 260 frg = 1.0; 261 262 set_parameters ( frg ); 258 // frg handled by BMEF 263 259 264 260 //name results (for logging) -
library/bdm/estim/arx.h
r766 r796 59 59 ARX* _copy() const; 60 60 61 void set_ parameters( double frg0 ) {61 void set_frg ( double frg0 ) { 62 62 frg = frg0; 63 63 } … … 159 159 void to_setting ( Setting &set ) const 160 160 { 161 BMEF::to_setting( set ); 162 // TODO DOPLNIT ANALOGICKY KE STAVAJICIMU FROM_SETTING 161 BMEF::to_setting( set ); // takes care of rv, yrv, rvc 162 int constant = have_constant ? 1 : 0; 163 UI::save(constant, set, "constant"); 164 UI::save(&est, set, "prior"); 165 UI::save(&alter_est, set, "alternative"); 166 167 163 168 } 164 169 }; -
library/bdm/mex/mex_parser.h
r756 r796 55 55 //treat empty matrices independently 56 56 mat val; 57 if ( mxGetM ( value ) > 0 ) {57 if ( mxGetM ( value ) > 0 && mxGetN(value)>0) { 58 58 val = mxArray2mat ( value ); 59 59 } -
library/bdm/stat/exp_family.h
r795 r796 106 106 { 107 107 BM::to_setting( set ); 108 UI::save(frg, set, "frg"); 108 109 // TODO DOPLNIT? ALE MOMENTALNE CHYBI FROM_SETTING PRO INSPIRACI 109 110 } 111 void from_setting( const Setting &set) { 112 BM::from_setting(set); 113 if ( !UI::get ( frg, set, "frg" ) ) 114 frg = 1.0; 115 116 } 110 117 }; 111 118 … … 313 320 void to_setting ( Setting& set ) const { 314 321 epdf::to_setting ( set ); 315 string s ( "egiw" );316 UI::save ( s, set, "class" );317 322 UI::save ( dimx, set, "dimx" ); 318 323 UI::save ( V.to_mat(), set, "V" );