@@ -193,70 +193,6 @@ class extractor : public argument_helper<const mxArray> {
193
193
return mxGetPr (array[pos]);
194
194
}
195
195
196
- std::vector<nix::Value> extractFromCells (size_t pos) const {
197
-
198
- std::vector<nix::Value> vals;
199
-
200
- mwSize total_num_of_cells = mxGetNumberOfElements (array[pos]);
201
- for (mwIndex index = 0 ; index<total_num_of_cells; index++) {
202
- const mxArray *cell_element_ptr = mxGetCell (array[pos], index);
203
-
204
- nix::Value currVal;
205
-
206
- switch (mxGetClassID (cell_element_ptr)) {
207
- case mxLOGICAL_CLASS:
208
- {
209
- const mxLogical *curr = mxGetLogicals (cell_element_ptr);
210
- currVal.set (curr[0 ]); break ; }
211
- case mxDOUBLE_CLASS:
212
- {
213
- double curr;
214
- const void *data = mxGetData (cell_element_ptr);
215
- memcpy (&curr, data, sizeof (double ));
216
- currVal.set (curr); break ; }
217
- case mxUINT32_CLASS:
218
- {
219
- uint32_t curr;
220
- const void *data = mxGetData (cell_element_ptr);
221
- memcpy (&curr, data, sizeof (uint32_t ));
222
- currVal.set (curr); break ; }
223
- case mxINT32_CLASS:
224
- {
225
- int32_t curr;
226
- const void *data = mxGetData (cell_element_ptr);
227
- memcpy (&curr, data, sizeof (int32_t ));
228
- currVal.set (curr); break ; }
229
- case mxUINT64_CLASS:
230
- {
231
- uint64_t curr;
232
- const void *data = mxGetData (cell_element_ptr);
233
- memcpy (&curr, data, sizeof (uint64_t ));
234
- currVal.set (curr); break ; }
235
- case mxINT64_CLASS:
236
- {
237
- int64_t curr;
238
- const void *data = mxGetData (cell_element_ptr);
239
- memcpy (&curr, data, sizeof (int64_t ));
240
- currVal.set (curr); break ; }
241
-
242
- case mxCHAR_CLASS:
243
- {
244
- char *tmp = mxArrayToString (cell_element_ptr);
245
- std::string curr_string = tmp;
246
- currVal.set (curr_string);
247
- mxFree (tmp);
248
- break ;
249
- }
250
- case mxUNKNOWN_CLASS:
251
- { mexWarnMsgTxt (" Unknown class." ); break ; }
252
- default :
253
- { mexWarnMsgTxt (" Unsupported class." ); break ; }
254
- }
255
- vals.push_back (currVal);
256
- }
257
- return vals;
258
- }
259
-
260
196
std::vector<nix::Value> extractFromStruct (size_t pos) const {
261
197
262
198
// Note: nix::Value is not able to its attributes "uncertainty"
0 commit comments