Changeset 413
- Timestamp:
- 07/07/09 23:09:17 (16 years ago)
- Location:
- library
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/mex/config2mxstruct.h
r391 r413 26 26 double *elements = new double[setting.getLength()]; 27 27 for (int i=0; i<setting.getLength(); i++) { 28 elements[i] = setting[i]; 28 if (setting.getType() == Setting::TypeInt) { //TODO: tady je chyba -- zaporna cisla nejsou TypeInt 29 elements[i] = setting[i]; 30 } else { 31 elements[i] = (int) setting[i]; 32 } 29 33 } 30 34 vec &v = *(new vec(elements, setting.getLength())); 31 mxArray *result ;35 mxArray *result = mxCreateDoubleMatrix(1, setting.getLength(), mxREAL); 32 36 vec2mxArray(v, result); 33 37 delete &v; … … 48 52 } 49 53 mat &m = *(new mat(elements, rows, cols)); 50 mxArray *result ;54 mxArray *result = mxCreateDoubleMatrix(rows, cols, mxREAL); 51 55 mat2mxArray(m, result); 52 56 delete &m; … … 101 105 mxArray* list2mxcell(const Setting &setting) { 102 106 if (!setting.isList()) mexErrMsgTxt("Given setting is not a list."); 107 if (setting.getLength() == 0) { 108 mxArray *result = mxCreateCellMatrix(1, 0); 109 return result; 110 } 103 111 if ((setting[0].getType() == Setting::TypeString) && ("matrix" == setting[0])) { 104 112 return list2mxmatrix(setting); -
library/system/SetBdmEnv.cmake
r412 r413 89 89 target_link_libraries (${FN} ${FRAMEWORK_VECLIB}) 90 90 ENDIF(APPLE) 91 #target_link_libraries (${FN} itpp)92 target_link_libraries (${FN} debug itpp_debug)93 target_link_libraries (${FN} optimized itpp)91 target_link_libraries (${FN} itpp) 92 # target_link_libraries (${FN} debug itpp_debug) 93 # target_link_libraries (${FN} optimized itpp) 94 94 ENDIF(WIN32) 95 95 target_link_libraries (${FN} bdm)