- Timestamp:
- 06/11/09 16:38:30 (16 years ago)
- Location:
- library/mex
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
library/mex/estimator.cpp
r314 r373 1 1 #include <itpp/itmex.h> 2 2 3 #include <stat/libDS_ui.h> 4 #include <estim/arx_ui.h> 3 #include "estim/arx.h" 4 #include "stat/libDS.h" 5 #include "stat/loggers.h" 6 #include "mexlog.h" 5 7 6 #include "mexlog.h" 7 #include "mexds.h" 8 //#include "mexds.h" 8 9 9 10 using namespace bdm; … … 20 21 21 22 printf("name: %s", fname.c_str()); 22 UI File F ( fname.c_str());23 UI_File F ( fname.c_str()); 23 24 24 logger* L; 25 DS * DS; 26 BM* E; 27 int Ndat; 28 29 try { 30 UIbuild ( F.lookup ( "logger" ),L ); 31 UIbuild ( F.lookup ( "system" ),DS ); 32 F.lookupValue ( "experiment.ndat",Ndat ); 33 UIbuild ( F.lookup ( "estimator" ),E ); 34 } 35 catch UICATCH; 25 logger* L = UI::build<logger>( F, "logger"); 26 ArxDS * DS = UI::build<ArxDS>( F, "system" ); 27 BM* E = UI::build<BM>( F, "estimator" ); 28 int Ndat = F.lookupValue ( "experiment.ndat",Ndat ); 36 29 37 30 DS->log_add ( *L ); -
library/mex/mexds.h
r342 r373 1 #include "../bdm/stat/libDS_ui.h"1 //#include "../bdm/stat/libDS_ui.h" 2 2 3 3 /*! \brief Create memory data source from mxArray -
library/mex/mexlog.h
r347 r373 1 #include " ../bdm/stat/loggers_ui.h"1 #include "stat/loggers.h" 2 2 3 namespace bdm{ 3 4 int mxReplaceFieldNM(mxArray *X,const char * fname,mxArray *X1) 4 5 { … … 19 20 }; 20 21 21 class mexlog : public memlog {22 class mexlog : public memlog { 22 23 public: 23 24 //! constructor 24 mexlog( int maxlen): memlog(maxlen,"mx"){};25 mexlog(): memlog(0,"mx"){}; 25 26 //! 26 27 mxArray* toCell(){ … … 48 49 return tmp; 49 50 } 51 void from_setting (const Setting &root){ 52 maxlen=root["maxlen"]; 53 } 50 54 }; 51 52 class UImexlog: public UIbuilder{ 53 public: 54 UImexlog():UIbuilder("mexlog"){}; 55 bdmroot* build(Setting &S) const{ 56 return new mexlog(S["maxlen"]); 57 }; 58 }; 59 UIREGISTER(UImexlog); 55 UIREGISTER(mexlog); 56 }