GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
mxarray.h
Go to the documentation of this file.
1 // DO NOT EDIT! Generated automatically by mx-mxarray-h.
2 /*
3 
4 Copyright (C) 2001-2017 Paul Kienzle
5 
6 This file is part of Octave.
7 
8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 /*
25 
26 Part of this code was originally distributed as part of Octave Forge under
27 the following terms:
28 
29 Author: Paul Kienzle
30 I grant this code to the public domain.
31 2001-03-22
32 
33 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
34 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
37 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 SUCH DAMAGE.
44 
45 */
46 
47 #if ! defined (octave_mxarray_h)
48 #define octave_mxarray_h 1
49 
50 #include "octave-config.h"
51 
52 typedef enum
53 {
71 }
72 mxClassID;
73 
74 typedef enum
75 {
76  mxREAL = 0,
78 }
80 
81 /* Matlab uses a wide char (uint16) internally, but Octave uses plain char. */
82 /* typedef Uint16 mxChar; */
83 typedef char mxChar;
84 
85 typedef unsigned char mxLogical;
86 
87 /*
88  * FIXME: Mathworks says mwSize, mwIndex should be int generally.
89  * But on 64-bit systems, or when mex -largeArrayDims is used, it is size_t.
90  * mwSignedIndex is supposed to be ptrdiff_t. All of this is confusing.
91  * Its better to conform to the same indexing as the rest of Octave.
92  */
93 typedef int mwSize;
94 typedef int mwIndex;
95 typedef int mwSignedIndex;
96 
97 #if ! defined (MXARRAY_TYPEDEFS_ONLY)
98 
99 #include <cstring>
100 #include "error.h"
101 
102 class octave_value;
103 
104 #define DO_MUTABLE_METHOD(RET_T, METHOD_CALL) \
105  RET_T retval = rep->METHOD_CALL; \
106  \
107  if (rep->mutation_needed ()) \
108  { \
109  maybe_mutate (); \
110  retval = rep->METHOD_CALL; \
111  } \
112  \
113  return retval
114 
115 #define DO_VOID_MUTABLE_METHOD(METHOD_CALL) \
116  rep->METHOD_CALL; \
117  \
118  if (rep->mutation_needed ()) \
119  { \
120  maybe_mutate (); \
121  rep->METHOD_CALL; \
122  }
123 
124 class mxArray;
125 
126 // A class to provide the default implementation of some of the
127 // virtual functions declared in the mxArray class.
128 
130 {
131 protected:
132 
133  mxArray_base (void) { }
134 
135 public:
136 
137  virtual mxArray_base *dup (void) const = 0;
138 
139  virtual mxArray *as_mxArray (void) const { return 0; }
140 
141  virtual ~mxArray_base (void) { }
142 
143  virtual bool is_octave_value (void) const { return false; }
144 
145  virtual int is_cell (void) const = 0;
146 
147  virtual int is_char (void) const = 0;
148 
149  virtual int is_class (const char *name_arg) const
150  {
151  int retval = 0;
152 
153  const char *cname = get_class_name ();
154 
155  if (cname && name_arg)
156  retval = ! strcmp (cname, name_arg);
157 
158  return retval;
159  }
160 
161  virtual int is_complex (void) const = 0;
162 
163  virtual int is_double (void) const = 0;
164 
165  virtual int is_function_handle (void) const = 0;
166 
167  virtual int is_int16 (void) const = 0;
168 
169  virtual int is_int32 (void) const = 0;
170 
171  virtual int is_int64 (void) const = 0;
172 
173  virtual int is_int8 (void) const = 0;
174 
175  virtual int is_logical (void) const = 0;
176 
177  virtual int is_numeric (void) const = 0;
178 
179  virtual int is_single (void) const = 0;
180 
181  virtual int is_sparse (void) const = 0;
182 
183  virtual int is_struct (void) const = 0;
184 
185  virtual int is_uint16 (void) const = 0;
186 
187  virtual int is_uint32 (void) const = 0;
188 
189  virtual int is_uint64 (void) const = 0;
190 
191  virtual int is_uint8 (void) const = 0;
192 
193  virtual int is_logical_scalar (void) const
194  {
195  return is_logical () && get_number_of_elements () == 1;
196  }
197 
198  virtual int is_logical_scalar_true (void) const = 0;
199 
200  virtual mwSize get_m (void) const = 0;
201 
202  virtual mwSize get_n (void) const = 0;
203 
204  virtual mwSize *get_dimensions (void) const = 0;
205 
206  virtual mwSize get_number_of_dimensions (void) const = 0;
207 
208  virtual void set_m (mwSize m) = 0;
209 
210  virtual void set_n (mwSize n) = 0;
211 
212  virtual int set_dimensions (mwSize *dims_arg, mwSize ndims_arg) = 0;
213 
214  virtual mwSize get_number_of_elements (void) const = 0;
215 
216  virtual int is_empty (void) const = 0;
217 
218  virtual bool is_scalar (void) const = 0;
219 
220  virtual mxClassID get_class_id (void) const = 0;
221 
222  virtual const char *get_class_name (void) const = 0;
223 
224  virtual void set_class_name (const char *name_arg) = 0;
225 
226  // FIXME: Why not just have this '= 0' as the others?
227  // Could then eliminate err_invalid_type function and #include "error.h".
228  virtual mxArray *get_cell (mwIndex /*idx*/) const
229  {
230  err_invalid_type ();
231  }
232 
233  virtual void set_cell (mwIndex idx, mxArray *val) = 0;
234 
235  virtual double get_scalar (void) const = 0;
236 
237  virtual void *get_data (void) const = 0;
238 
239  virtual void *get_imag_data (void) const = 0;
240 
241  virtual void set_data (void *pr) = 0;
242 
243  virtual void set_imag_data (void *pi) = 0;
244 
245  virtual mwIndex *get_ir (void) const = 0;
246 
247  virtual mwIndex *get_jc (void) const = 0;
248 
249  virtual mwSize get_nzmax (void) const = 0;
250 
251  virtual void set_ir (mwIndex *ir) = 0;
252 
253  virtual void set_jc (mwIndex *jc) = 0;
254 
255  virtual void set_nzmax (mwSize nzmax) = 0;
256 
257  virtual int add_field (const char *key) = 0;
258 
259  virtual void remove_field (int key_num) = 0;
260 
261  virtual mxArray *get_field_by_number (mwIndex index, int key_num) const = 0;
262 
263  virtual void
264  set_field_by_number (mwIndex index, int key_num, mxArray *val) = 0;
265 
266  virtual int get_number_of_fields (void) const = 0;
267 
268  virtual const char *get_field_name_by_number (int key_num) const = 0;
269 
270  virtual int get_field_number (const char *key) const = 0;
271 
272  virtual int get_string (char *buf, mwSize buflen) const = 0;
273 
274  virtual char *array_to_string (void) const = 0;
275 
276  virtual mwIndex calc_single_subscript (mwSize nsubs, mwIndex *subs) const = 0;
277 
278  virtual size_t get_element_size (void) const = 0;
279 
280  virtual bool mutation_needed (void) const { return false; }
281 
282  virtual mxArray *mutate (void) const { return 0; }
283 
284  virtual octave_value as_octave_value (void) const = 0;
285 
286 protected:
287 
289 
290  // FIXME: Deprecated in 4.2, remove in 4.6
291  OCTAVE_DEPRECATED ("use 'err_invalid_type' instead")
292  void invalid_type_error (void) const
293  {
294  error ("invalid type for operation");
295  }
296 
297  OCTAVE_NORETURN void err_invalid_type (void) const
298  {
299  error ("invalid type for operation");
300  }
301 };
302 
303 // The main interface class. The representation can be based on an
304 // octave_value object or a separate object that tries to reproduce
305 // the semantics of mxArray objects in Matlab more directly.
306 
307 class mxArray
308 {
309 public:
310 
311  mxArray (const octave_value& ov);
312 
313  mxArray (mxClassID id, mwSize ndims, const mwSize *dims,
314  mxComplexity flag = mxREAL, bool init = true);
315 
316  mxArray (mxClassID id, const dim_vector& dv, mxComplexity flag = mxREAL);
317 
318  mxArray (mxClassID id, mwSize m, mwSize n,
319  mxComplexity flag = mxREAL, bool init = true);
320 
321  mxArray (mxClassID id, double val);
322 
323  mxArray (mxClassID id, mxLogical val);
324 
325  mxArray (const char *str);
326 
327  mxArray (mwSize m, const char **str);
328 
329  mxArray (mxClassID id, mwSize m, mwSize n, mwSize nzmax,
330  mxComplexity flag = mxREAL);
331 
332  mxArray (mwSize ndims, const mwSize *dims, int num_keys, const char **keys);
333 
334  mxArray (const dim_vector& dv, int num_keys, const char **keys);
335 
336  mxArray (mwSize m, mwSize n, int num_keys, const char **keys);
337 
338  mxArray (mwSize ndims, const mwSize *dims);
339 
340  mxArray (const dim_vector& dv);
341 
342  mxArray (mwSize m, mwSize n);
343 
344  mxArray *dup (void) const
345  {
346  mxArray *retval = rep->as_mxArray ();
347 
348  if (retval)
349  retval->set_name (name);
350  else
351  {
352  mxArray_base *new_rep = rep->dup ();
353 
354  retval = new mxArray (new_rep, name);
355  }
356 
357  return retval;
358  }
359 
360  ~mxArray (void);
361 
362  bool is_octave_value (void) const { return rep->is_octave_value (); }
363 
364  int is_cell (void) const { return rep->is_cell (); }
365 
366  int is_char (void) const { return rep->is_char (); }
367 
368  int is_class (const char *name_arg) const { return rep->is_class (name_arg); }
369 
370  int is_complex (void) const { return rep->is_complex (); }
371 
372  int is_double (void) const { return rep->is_double (); }
373 
374  int is_function_handle (void) const { return rep->is_function_handle (); }
375 
376  int is_int16 (void) const { return rep->is_int16 (); }
377 
378  int is_int32 (void) const { return rep->is_int32 (); }
379 
380  int is_int64 (void) const { return rep->is_int64 (); }
381 
382  int is_int8 (void) const { return rep->is_int8 (); }
383 
384  int is_logical (void) const { return rep->is_logical (); }
385 
386  int is_numeric (void) const { return rep->is_numeric (); }
387 
388  int is_single (void) const { return rep->is_single (); }
389 
390  int is_sparse (void) const { return rep->is_sparse (); }
391 
392  int is_struct (void) const { return rep->is_struct (); }
393 
394  int is_uint16 (void) const { return rep->is_uint16 (); }
395 
396  int is_uint32 (void) const { return rep->is_uint32 (); }
397 
398  int is_uint64 (void) const { return rep->is_uint64 (); }
399 
400  int is_uint8 (void) const { return rep->is_uint8 (); }
401 
402  int is_logical_scalar (void) const { return rep->is_logical_scalar (); }
403 
404  int is_logical_scalar_true (void) const
405  { return rep->is_logical_scalar_true (); }
406 
407  mwSize get_m (void) const { return rep->get_m (); }
408 
409  mwSize get_n (void) const { return rep->get_n (); }
410 
411  mwSize *get_dimensions (void) const { return rep->get_dimensions (); }
412 
414  { return rep->get_number_of_dimensions (); }
415 
417 
419 
420  int set_dimensions (mwSize *dims_arg, mwSize ndims_arg)
421  { DO_MUTABLE_METHOD (int, set_dimensions (dims_arg, ndims_arg)); }
422 
424  { return rep->get_number_of_elements (); }
425 
426  int is_empty (void) const { return get_number_of_elements () == 0; }
427 
428  bool is_scalar (void) const { return rep->is_scalar (); }
429 
430  const char *get_name (void) const { return name; }
431 
432  void set_name (const char *name_arg);
433 
434  mxClassID get_class_id (void) const { return rep->get_class_id (); }
435 
436  const char *get_class_name (void) const { return rep->get_class_name (); }
437 
438  void set_class_name (const char *name_arg)
439  { DO_VOID_MUTABLE_METHOD (set_class_name (name_arg)); }
440 
441  mxArray *get_cell (mwIndex idx) const
442  { DO_MUTABLE_METHOD (mxArray *, get_cell (idx)); }
443 
444  void set_cell (mwIndex idx, mxArray *val)
445  { DO_VOID_MUTABLE_METHOD (set_cell (idx, val)); }
446 
447  double get_scalar (void) const { return rep->get_scalar (); }
448 
449  void *get_data (void) const { DO_MUTABLE_METHOD (void *, get_data ()); }
450 
451  void *get_imag_data (void) const
452  { DO_MUTABLE_METHOD (void *, get_imag_data ()); }
453 
454  void set_data (void *pr) { DO_VOID_MUTABLE_METHOD (set_data (pr)); }
455 
457 
458  mwIndex *get_ir (void) const { DO_MUTABLE_METHOD (mwIndex *, get_ir ()); }
459 
460  mwIndex *get_jc (void) const { DO_MUTABLE_METHOD (mwIndex *, get_jc ()); }
461 
462  mwSize get_nzmax (void) const { return rep->get_nzmax (); }
463 
465 
467 
468  void set_nzmax (mwSize nzmax) { DO_VOID_MUTABLE_METHOD (set_nzmax (nzmax)); }
469 
470  int add_field (const char *key) { DO_MUTABLE_METHOD (int, add_field (key)); }
471 
472  void remove_field (int key_num)
473  { DO_VOID_MUTABLE_METHOD (remove_field (key_num)); }
474 
475  mxArray *get_field_by_number (mwIndex index, int key_num) const
476  { DO_MUTABLE_METHOD (mxArray *, get_field_by_number (index, key_num)); }
477 
478  void set_field_by_number (mwIndex index, int key_num, mxArray *val)
479  { DO_VOID_MUTABLE_METHOD (set_field_by_number (index, key_num, val)); }
480 
481  int get_number_of_fields (void) const { return rep->get_number_of_fields (); }
482 
483  const char *get_field_name_by_number (int key_num) const
484  { DO_MUTABLE_METHOD (const char*, get_field_name_by_number (key_num)); }
485 
486  int get_field_number (const char *key) const
487  { DO_MUTABLE_METHOD (int, get_field_number (key)); }
488 
489  int get_string (char *buf, mwSize buflen) const
490  { return rep->get_string (buf, buflen); }
491 
492  char *array_to_string (void) const { return rep->array_to_string (); }
493 
495  { return rep->calc_single_subscript (nsubs, subs); }
496 
497  size_t get_element_size (void) const { return rep->get_element_size (); }
498 
499  bool mutation_needed (void) const { return rep->mutation_needed (); }
500 
501  mxArray *mutate (void) const { return rep->mutate (); }
502 
503  static void *malloc (size_t n);
504 
505  static void *calloc (size_t n, size_t t);
506 
507  static char *strsave (const char *str)
508  {
509  char *retval = 0;
510 
511  if (str)
512  {
513  mwSize sz = sizeof (mxChar) * (strlen (str) + 1);
514  retval = static_cast<char *> (mxArray::malloc (sz));
515  strcpy (retval, str);
516  }
517 
518  return retval;
519  }
520 
521  static octave_value as_octave_value (const mxArray *ptr);
522 
523 protected:
524 
525  octave_value as_octave_value (void) const;
526 
527 private:
528 
529  mutable mxArray_base *rep;
530 
531  char *name;
532 
533  mxArray (mxArray_base *r, const char *n)
534  : rep (r), name (mxArray::strsave (n)) { }
535 
536  void maybe_mutate (void) const;
537 
538  // No copying!
539 
540  mxArray (const mxArray&);
541 
542  mxArray& operator = (const mxArray&);
543 };
544 
545 #undef DO_MUTABLE_METHOD
546 #undef DO_VOID_MUTABLE_METHOD
547 
548 #endif
549 #endif
virtual int get_field_number(const char *key) const =0
mxArray & operator=(const mxArray &)
bool is_scalar(void) const
Definition: mxarray.h:428
void set_name(const char *name_arg)
Definition: mex.cc:2017
mxArray(const octave_value &ov)
Definition: mex.cc:1960
int get_string(char *buf, mwSize buflen) const
Definition: mxarray.h:489
unsigned char mxLogical
Definition: mxarray.h:85
virtual mxArray_base * dup(void) const =0
virtual int is_numeric(void) const =0
virtual mxClassID get_class_id(void) const =0
const char * get_name(void) const
Definition: mxarray.h:430
#define DO_MUTABLE_METHOD(RET_T, METHOD_CALL)
Definition: mxarray.h:104
void set_field_by_number(mwIndex index, int key_num, mxArray *val)
Definition: mxarray.h:478
int is_int8(void) const
Definition: mxarray.h:382
virtual int is_uint32(void) const =0
virtual const char * get_class_name(void) const =0
int is_int64(void) const
Definition: mxarray.h:380
virtual int is_complex(void) const =0
int is_int16(void) const
Definition: mxarray.h:376
bool is_octave_value(void) const
Definition: mxarray.h:362
int get_field_number(const char *key) const
Definition: mxarray.h:486
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
void set_imag_data(void *pi)
Definition: mxarray.h:456
int is_logical(void) const
Definition: mxarray.h:384
int is_logical_scalar(void) const
Definition: mxarray.h:402
mxComplexity
Definition: mxarray.h:74
virtual int is_logical_scalar_true(void) const =0
mxArray * dup(void) const
Definition: mxarray.h:344
mwSize get_number_of_dimensions(void) const
Definition: mxarray.h:413
virtual void set_nzmax(mwSize nzmax)=0
int is_uint16(void) const
Definition: mxarray.h:394
virtual void set_m(mwSize m)=0
virtual int get_number_of_fields(void) const =0
mxArray_base(void)
Definition: mxarray.h:133
void invalid_type_error(void) const
Definition: mxarray.h:292
void error(const char *fmt,...)
Definition: error.cc:570
static void * malloc(size_t n)
Definition: mex.cc:2379
void * get_data(void) const
Definition: mxarray.h:449
int is_struct(void) const
Definition: mxarray.h:392
virtual void set_cell(mwIndex idx, mxArray *val)=0
octave_value as_octave_value(void) const
Definition: mex.cc:2030
virtual int is_struct(void) const =0
int is_complex(void) const
Definition: mxarray.h:370
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
Definition: ov-usr-fcn.cc:935
virtual bool is_octave_value(void) const
Definition: mxarray.h:143
mxArray * get_field_by_number(mwIndex index, int key_num) const
Definition: mxarray.h:475
mwSize * get_dimensions(void) const
Definition: mxarray.h:411
double get_scalar(void) const
Definition: mxarray.h:447
void set_nzmax(mwSize nzmax)
Definition: mxarray.h:468
virtual int set_dimensions(mwSize *dims_arg, mwSize ndims_arg)=0
virtual double get_scalar(void) const =0
int mwSignedIndex
Definition: mxarray.h:95
int is_double(void) const
Definition: mxarray.h:372
bool mutation_needed(void) const
Definition: mxarray.h:499
int is_sparse(void) const
Definition: mxarray.h:390
virtual void remove_field(int key_num)=0
virtual int is_uint64(void) const =0
void set_cell(mwIndex idx, mxArray *val)
Definition: mxarray.h:444
mxArray * get_cell(mwIndex idx) const
Definition: mxarray.h:441
virtual void set_data(void *pr)=0
mwIndex * get_ir(void) const
Definition: mxarray.h:458
virtual mwSize get_n(void) const =0
virtual int get_string(char *buf, mwSize buflen) const =0
virtual ~mxArray_base(void)
Definition: mxarray.h:141
virtual int is_int32(void) const =0
void set_ir(mwIndex *ir)
Definition: mxarray.h:464
virtual void * get_imag_data(void) const =0
virtual int is_class(const char *name_arg) const
Definition: mxarray.h:149
int is_empty(void) const
Definition: mxarray.h:426
virtual mwIndex * get_ir(void) const =0
int is_uint64(void) const
Definition: mxarray.h:398
virtual int add_field(const char *key)=0
int is_uint32(void) const
Definition: mxarray.h:396
static char * strsave(const char *str)
Definition: mxarray.h:507
virtual int is_logical(void) const =0
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
const char * get_field_name_by_number(int key_num) const
Definition: mxarray.h:483
virtual mwIndex calc_single_subscript(mwSize nsubs, mwIndex *subs) const =0
static void * calloc(size_t n, size_t t)
Definition: mex.cc:2385
int get_number_of_fields(void) const
Definition: mxarray.h:481
bool strcmp(const T &str_a, const T &str_b)
True if strings are the same.
Definition: oct-string.cc:112
std::string str
Definition: hash.cc:118
virtual mwSize get_nzmax(void) const =0
idx subs
Definition: ov.cc:3080
char mxChar
Definition: mxarray.h:83
octave_value retval
Definition: data.cc:6294
mxArray_base * rep
Definition: mxarray.h:529
virtual int is_empty(void) const =0
OCTAVE_NORETURN void err_invalid_type(void) const
Definition: mxarray.h:297
void set_class_name(const char *name_arg)
Definition: mxarray.h:438
virtual octave_value as_octave_value(void) const =0
void set_jc(mwIndex *jc)
Definition: mxarray.h:466
virtual int is_cell(void) const =0
int set_dimensions(mwSize *dims_arg, mwSize ndims_arg)
Definition: mxarray.h:420
mxClassID get_class_id(void) const
Definition: mxarray.h:434
virtual void set_ir(mwIndex *ir)=0
sz
Definition: data.cc:5342
virtual int is_sparse(void) const =0
virtual void set_jc(mwIndex *jc)=0
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
Definition: sub2ind.cc:255
T::size_type strlen(const typename T::value_type *str)
Definition: oct-string.cc:75
mwSize get_m(void) const
Definition: mxarray.h:407
virtual size_t get_element_size(void) const =0
mwIndex calc_single_subscript(mwSize nsubs, mwIndex *subs) const
Definition: mxarray.h:494
#define DO_VOID_MUTABLE_METHOD(METHOD_CALL)
Definition: mxarray.h:115
int is_int32(void) const
Definition: mxarray.h:378
int add_field(const char *key)
Definition: mxarray.h:470
mwSize get_nzmax(void) const
Definition: mxarray.h:462
virtual mwSize get_number_of_elements(void) const =0
size_t get_element_size(void) const
Definition: mxarray.h:497
virtual bool is_scalar(void) const =0
int is_single(void) const
Definition: mxarray.h:388
virtual mwSize * get_dimensions(void) const =0
virtual mwSize get_m(void) const =0
virtual bool mutation_needed(void) const
Definition: mxarray.h:280
mwSize get_number_of_elements(void) const
Definition: mxarray.h:423
virtual mxArray * as_mxArray(void) const
Definition: mxarray.h:139
virtual mxArray * get_cell(mwIndex) const
Definition: mxarray.h:228
virtual int is_uint16(void) const =0
mxArray * mutate(void) const
Definition: mxarray.h:501
int is_uint8(void) const
Definition: mxarray.h:400
void * get_imag_data(void) const
Definition: mxarray.h:451
virtual mwIndex * get_jc(void) const =0
char * name
Definition: mxarray.h:531
virtual void set_class_name(const char *name_arg)=0
void set_data(void *pr)
Definition: mxarray.h:454
int is_cell(void) const
Definition: mxarray.h:364
mwSize get_n(void) const
Definition: mxarray.h:409
mxClassID
Definition: mxarray.h:52
void set_m(mwSize m)
Definition: mxarray.h:416
virtual char * array_to_string(void) const =0
virtual int is_logical_scalar(void) const
Definition: mxarray.h:193
virtual int is_uint8(void) const =0
int mwIndex
Definition: mxarray.h:94
virtual int is_function_handle(void) const =0
virtual int is_int16(void) const =0
int is_numeric(void) const
Definition: mxarray.h:386
mxArray(mxArray_base *r, const char *n)
Definition: mxarray.h:533
virtual void set_imag_data(void *pi)=0
mwIndex * get_jc(void) const
Definition: mxarray.h:460
virtual int is_single(void) const =0
const char * get_class_name(void) const
Definition: mxarray.h:436
virtual void set_field_by_number(mwIndex index, int key_num, mxArray *val)=0
~mxArray(void)
Definition: mex.cc:2009
virtual int is_int64(void) const =0
mxArray_base(const mxArray_base &)
Definition: mxarray.h:288
int is_function_handle(void) const
Definition: mxarray.h:374
int is_logical_scalar_true(void) const
Definition: mxarray.h:404
virtual void * get_data(void) const =0
int mwSize
Definition: mxarray.h:93
Definition: mxarray.h:76
virtual const char * get_field_name_by_number(int key_num) const =0
virtual void set_n(mwSize n)=0
virtual int is_int8(void) const =0
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
void remove_field(int key_num)
Definition: mxarray.h:472
int is_class(const char *name_arg) const
Definition: mxarray.h:368
char * array_to_string(void) const
Definition: mxarray.h:492
virtual mxArray * mutate(void) const
Definition: mxarray.h:282
int is_char(void) const
Definition: mxarray.h:366
dim_vector dv
Definition: sub2ind.cc:263
void set_n(mwSize n)
Definition: mxarray.h:418
virtual int is_char(void) const =0
virtual mwSize get_number_of_dimensions(void) const =0
virtual int is_double(void) const =0
static const double pi
Definition: lo-specfun.cc:3610
void maybe_mutate(void) const
Definition: mex.cc:2036
virtual mxArray * get_field_by_number(mwIndex index, int key_num) const =0