Changeset 384 for library/bdm/mex

Show
Ignore:
Timestamp:
06/19/09 10:17:25 (15 years ago)
Author:
mido
Message:

possibly broken?

Location:
library/bdm
Files:
1 added
4 moved

Legend:

Unmodified
Added
Removed
  • library/bdm/mex/mex_datasource.h

    r377 r384  
    1 #include "../bdm/stat/libDS.h" 
    2 #include "mexparse.h" 
     1#include "../bdm/stat/datasources.h" 
     2#include "mex_parser.h" 
    33 
    44namespace bdm { 
  • library/bdm/mex/mex_logger.h

    r373 r384  
    1 #include "stat/loggers.h" 
     1#include "base/loggers.h" 
    22 
    33namespace bdm{ 
     
    2020}; 
    2121 
     22void Arrayvec2mxArray(const Array<vec> &in, mxArray *out) 
     23{ 
     24  int rows, cols, r, c; 
     25 
     26  double* temp = (double *) mxGetPr(out); 
     27  if (temp == 0) mexErrMsgTxt("mat2mxArray: Pointer to data is NULL"); 
     28 
     29  cols = in.size(); 
     30  if (cols == 0) mexErrMsgTxt("mat2mxArray: Data has zero columns"); 
     31 
     32  rows = in(0).length(); //length of the first vec 
     33  if (rows == 0) mexErrMsgTxt("mat2mxArray: Data has zero rows"); 
     34 
     35  for (c = 0; c < cols; c++) { 
     36    for (r = 0; r < rows; r++) { 
     37      *temp++ = in(c)(r); 
     38    } 
     39  } 
     40 
     41} 
    2242class mexlog : public memlog { 
    2343        public: