Changeset 477 for library/bdm/mex/mex_datasource.h
- Timestamp:
- 08/05/09 14:40:03 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/mex/mex_datasource.h
r471 r477 11 11 */ 12 12 class MexDS : public MemDS { 13 13 //!Default constructor 14 14 MexDS () {}; 15 15 … … 27 27 MemDS with the above fields will be created; 28 28 29 \todo Very memory inefficient implementation. The data file is copied 2 times! 29 \todo Very memory inefficient implementation. The data file is copied 2 times! 30 30 For better implementatin we would need MemDS with pointer to the raw data. Then it could operate directly inside mxArray. 31 31 32 32 */ 33 void from_setting( const Setting &set ) 34 { 35 Data = mxArray2mat(mexGetVariable("base",set["varname"])); 36 UI::get( rowid, set, "rids" , UI::compulsory); 37 it_assert_debug ( max ( rowid ) <=Data.rows(),"MemDS rowid is too high for given Dat." ); 33 void from_setting ( const Setting &set ) { 34 Data = mxArray2mat ( mexGetVariable ( "base", set["varname"] ) ); 35 UI::get ( rowid, set, "rids" , UI::compulsory ); 36 it_assert_debug ( max ( rowid ) <= Data.rows(), "MemDS rowid is too high for given Dat." ); 38 37 39 UI::get ( delays, set, "tds", UI::compulsory );38 UI::get ( delays, set, "tds", UI::compulsory ); 40 39 time = max ( delays ); 41 it_assert_debug ( time < Data.cols(), "MemDS delays are too high." );40 it_assert_debug ( time < Data.cols(), "MemDS delays are too high." ); 42 41 43 RV* r = UI::build<RV> (set,"rv", UI::compulsory);44 RV ru =RV();45 set_rvs (*r,ru);42 RV* r = UI::build<RV> ( set, "rv", UI::compulsory ); 43 RV ru = RV(); 44 set_rvs ( *r, ru ); 46 45 } 47 46 … … 50 49 }; 51 50 52 UIREGISTER (MexDS);51 UIREGISTER ( MexDS ); 53 52 54 53 }