Changeset 660 for library/bdm/mex
- Timestamp:
- 10/15/09 00:04:30 (15 years ago)
- Location:
- library/bdm/mex
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/mex/mex_BM.h
r599 r660 15 15 using namespace bdm; 16 16 17 //! epdf with functions implemented in matlab 17 18 class mexEpdf: public epdf{ 18 19 protected: 20 //! prefix of matlab functions 19 21 string name; 22 //! pointer to storage structure 20 23 mxArray *data; 21 24 public: … … 40 43 UIREGISTER(mexEpdf); 41 44 45 //! BM with functions implemented in matlab 42 46 class mexBM: public BM{ 43 47 protected : 48 //! prefix of matlab functions 44 49 string name; 50 //! internal estimator 45 51 mexEpdf est; 52 //! mxArray with attributes of this object 46 53 mxArray *data; 47 54 public: 48 55 mexBM() {} 49 56 57 //! duplicate internal data pointer? 50 58 mxArray *get_data() { 51 59 //mexCallMATLAB(0, NULL, 1, &data, "dump"); … … 81 89 //mexCallMATLAB(0, NULL, 1, &data, "dump"); 82 90 } 91 //! return correctly typed posterior (covariant return) 83 92 const mexEpdf& posterior() const { 84 93 return est; 85 } //tohle by melo zustat!!86 const mexEpdf* _e() const {87 return &est;88 94 } //tohle by melo zustat!! 89 95 }; -
library/bdm/mex/mex_datasource.h
r609 r660 50 50 RV ru = RV(); 51 51 if (r){ 52 set_ rvs( *r, ru );52 set_drv ( *r, ru ); 53 53 } else { 54 54 RV def((const char*)set["varname"],Data.rows()); 55 set_ rvs(def, ru);55 set_drv(def, ru); 56 56 } 57 57 } … … 125 125 dt=mxArray2vec(tmp); 126 126 } 127 void write( vec &ut0){ ut=ut0;}127 void write(const vec &ut0){ ut=ut0;} 128 128 void getdata(vec &dt_out){dt_out = dt; } 129 129 -
library/bdm/mex/mex_logger.h
r609 r660 49 49 //! constructor 50 50 mexlog(long maxlen0) : memlog ( maxlen0, "" ) {}; 51 //! 51 //! copy internal data to output mxArray 52 52 mxArray* toCell() { 53 53 mxArray* tmp = mxCreateStructMatrix ( 1, 1, 0, NULL );