GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mexproto.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2006-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 /*
27 
28 This code was originally distributed as part of Octave Forge under
29 the following terms:
30 
31 Author: Paul Kienzle
32 I grant this code to the public domain.
33 2001-03-22
34 
35 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
36 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
39 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
40 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
41 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
43 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
44 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 SUCH DAMAGE.
46 
47 */
48 
49 /* mex.h is for use in C-programs only; do NOT include it in mex.cc */
50 
51 #if ! defined (octave_mexproto_h)
52 #define octave_mexproto_h 1
53 
54 #include "octave-config.h"
55 
56 #if defined (__cplusplus)
57 # include <cstdlib>
58 using std::size_t;
59 extern "C" {
60 #else
61 # include <stdlib.h>
62 # include <stdbool.h>
63 #endif
64 
65 #if ! defined (MX_HAS_INTERLEAVED_COMPLEX)
66 # define MX_HAS_INTERLEAVED_COMPLEX 0
67 #endif
68 
69 #define MXARRAY_TYPEDEFS_ONLY
70 #include "mxarray.h"
71 #undef MXARRAY_TYPEDEFS_ONLY
72 
73 /* Prototype for the gateway function. */
74 
75 extern void mexFunction (int nlhs, mxArray *plhs[],
76  int nrhs, const mxArray *prhs[]);
77 
78 /* Interface to the interpreter. */
79 extern OCTINTERP_API const char * mexFunctionName (void);
80 
81 extern OCTINTERP_API int mexCallMATLAB (int nargout, mxArray *argout[],
82  int nargin, mxArray *argin[],
83  const char *fname);
84 extern OCTINTERP_API mxArray *mexCallMATLABWithTrap (int nargout,
85  mxArray *argout[],
86  int nargin,
87  mxArray *argin[],
88  const char *fname);
89 
90 extern OCTINTERP_API int mexEvalString (const char *s);
91 extern OCTINTERP_API mxArray * mexEvalStringWithTrap (const char *s);
92 
93 extern OCTINTERP_API void mexSetTrapFlag (int flag);
94 
95 extern OCTINTERP_API void mexErrMsgTxt (const char *s);
96 extern OCTINTERP_API void mexErrMsgIdAndTxt (const char *id, const char *s,
97  ...);
98 extern OCTINTERP_API void mexWarnMsgTxt (const char *s);
99 extern OCTINTERP_API void mexWarnMsgIdAndTxt (const char *id, const char *s,
100  ...);
101 extern OCTINTERP_API int mexPrintf (const char *fmt, ...);
102 
103 extern OCTINTERP_API mxArray *mexGetVariable (const char *space,
104  const char *name);
105 extern OCTINTERP_API const mxArray *mexGetVariablePtr (const char *space,
106  const char *name);
107 
108 extern OCTINTERP_API int mexPutVariable (const char *space, const char *name,
109  const mxArray *ptr);
110 
111 #if MX_HAS_INTERLEAVED_COMPLEX
112 # define mexGet mexGet_interleaved
113 #endif
114 extern OCTINTERP_API const mxArray *mexGet (double handle,
115  const char *property);
116 
117 extern OCTINTERP_API int mexSet (double handle, const char *property,
118  mxArray *val);
119 
120 extern OCTINTERP_API void mexMakeArrayPersistent (mxArray *ptr);
121 extern OCTINTERP_API void mexMakeMemoryPersistent (void *ptr);
122 
123 extern OCTINTERP_API void mexLock (void);
124 extern OCTINTERP_API void mexUnlock (void);
125 
126 extern OCTINTERP_API int mexIsGlobal (const mxArray *ptr);
127 extern OCTINTERP_API int mexIsLocked (void);
128 
129 extern OCTINTERP_API int mexAtExit (void (*f) (void));
130 
131 /* Floating point predicates. */
132 extern OCTINTERP_API bool mxIsFinite (double v);
133 extern OCTINTERP_API bool mxIsInf (double v);
134 extern OCTINTERP_API bool mxIsNaN (double v);
135 
136 /* Floating point values. */
137 extern OCTINTERP_API double mxGetEps (void);
138 extern OCTINTERP_API double mxGetInf (void);
139 extern OCTINTERP_API double mxGetNaN (void);
140 
141 /* Memory management. */
142 extern OCTINTERP_API void * mxCalloc (size_t n, size_t size);
143 extern OCTINTERP_API void * mxMalloc (size_t n);
144 extern OCTINTERP_API void * mxRealloc (void *ptr, size_t size);
145 extern OCTINTERP_API void mxFree (void *ptr);
146 
147 /* Constructors. */
148 #if MX_HAS_INTERLEAVED_COMPLEX
149 # define mxCreateCellArray mxCreateCellArray_interleaved
150 # define mxCreateCellMatrix mxCreateCellMatrix_interleaved
151 # define mxCreateCharArray mxCreateCharArray_interleaved
152 # define mxCreateCharMatrixFromStrings mxCreateCharMatrixFromStrings_interleaved
153 # define mxCreateDoubleMatrix mxCreateDoubleMatrix_interleaved
154 # define mxCreateDoubleScalar mxCreateDoubleScalar_interleaved
155 # define mxCreateLogicalArray mxCreateLogicalArray_interleaved
156 # define mxCreateLogicalMatrix mxCreateLogicalMatrix_interleaved
157 # define mxCreateLogicalScalar mxCreateLogicalScalar_interleaved
158 # define mxCreateNumericArray mxCreateNumericArray_interleaved
159 # define mxCreateNumericMatrix mxCreateNumericMatrix_interleaved
160 # define mxCreateUninitNumericArray mxCreateUninitNumericArray_interleaved
161 # define mxCreateUninitNumericMatrix mxCreateUninitNumericMatrix_interleaved
162 # define mxCreateSparse mxCreateSparse_interleaved
163 # define mxCreateSparseLogicalMatrix mxCreateSparseLogicalMatrix_interleaved
164 # define mxCreateString mxCreateString_interleaved
165 # define mxCreateStructArray mxCreateStructArray_interleaved
166 # define mxCreateStructMatrix mxCreateStructMatrix_interleaved
167 #endif
168 
169 extern OCTINTERP_API mxArray *mxCreateCellArray (mwSize ndims,
170  const mwSize *dims);
171 extern OCTINTERP_API mxArray * mxCreateCellMatrix (mwSize m, mwSize n);
172 extern OCTINTERP_API mxArray *mxCreateCharArray (mwSize ndims,
173  const mwSize *dims);
174 extern OCTINTERP_API mxArray *mxCreateCharMatrixFromStrings (mwSize m,
175  const char **str);
176 extern OCTINTERP_API mxArray *mxCreateDoubleMatrix (mwSize nr, mwSize nc,
177  mxComplexity flag);
178 extern OCTINTERP_API mxArray * mxCreateDoubleScalar (double val);
179 extern OCTINTERP_API mxArray *mxCreateLogicalArray (mwSize ndims,
180  const mwSize *dims);
181 extern OCTINTERP_API mxArray * mxCreateLogicalMatrix (mwSize m, mwSize n);
182 extern OCTINTERP_API mxArray * mxCreateLogicalScalar (mxLogical val);
183 extern OCTINTERP_API mxArray *mxCreateNumericArray (mwSize ndims,
184  const mwSize *dims,
185  mxClassID class_id,
186  mxComplexity flag);
187 extern OCTINTERP_API mxArray *mxCreateNumericMatrix (mwSize m, mwSize n,
188  mxClassID class_id,
189  mxComplexity flag);
190 extern OCTINTERP_API mxArray *mxCreateUninitNumericArray (mwSize ndims,
191  const mwSize *dims,
192  mxClassID class_id,
193  mxComplexity flag);
194 extern OCTINTERP_API mxArray *mxCreateUninitNumericMatrix (mwSize m, mwSize n,
195  mxClassID class_id,
196  mxComplexity flag);
197 
198 extern OCTINTERP_API mxArray *mxCreateSparse (mwSize m, mwSize n, mwSize nzmax,
199  mxComplexity flag);
200 extern OCTINTERP_API mxArray *mxCreateSparseLogicalMatrix (mwSize m, mwSize n,
201  mwSize nzmax);
202 extern OCTINTERP_API mxArray * mxCreateString (const char *str);
203 extern OCTINTERP_API mxArray *mxCreateStructArray (mwSize ndims,
204  const mwSize *dims,
205  int num_keys,
206  const char **keys);
207 extern OCTINTERP_API mxArray *mxCreateStructMatrix (mwSize rows, mwSize cols,
208  int num_keys,
209  const char **keys);
210 
211 /* Copy constructor. */
212 extern OCTINTERP_API mxArray * mxDuplicateArray (const mxArray *v);
213 
214 /* Destructor. */
215 extern OCTINTERP_API void mxDestroyArray (mxArray *v);
216 
217 /* Type Predicates. */
218 extern OCTINTERP_API bool mxIsCell (const mxArray *ptr);
219 extern OCTINTERP_API bool mxIsChar (const mxArray *ptr);
220 extern OCTINTERP_API bool mxIsClass (const mxArray *ptr, const char *name);
221 extern OCTINTERP_API bool mxIsComplex (const mxArray *ptr);
222 extern OCTINTERP_API bool mxIsDouble (const mxArray *ptr);
223 /* Matlab seems to have deprecated IsFunctionHandle, but it seems useful */
224 extern OCTINTERP_API bool mxIsFunctionHandle (const mxArray *ptr);
225 extern OCTINTERP_API bool mxIsInt16 (const mxArray *ptr);
226 extern OCTINTERP_API bool mxIsInt32 (const mxArray *ptr);
227 extern OCTINTERP_API bool mxIsInt64 (const mxArray *ptr);
228 extern OCTINTERP_API bool mxIsInt8 (const mxArray *ptr);
229 extern OCTINTERP_API bool mxIsLogical (const mxArray *ptr);
230 extern OCTINTERP_API bool mxIsNumeric (const mxArray *ptr);
231 extern OCTINTERP_API bool mxIsSingle (const mxArray *ptr);
232 extern OCTINTERP_API bool mxIsSparse (const mxArray *ptr);
233 extern OCTINTERP_API bool mxIsStruct (const mxArray *ptr);
234 extern OCTINTERP_API bool mxIsUint16 (const mxArray *ptr);
235 extern OCTINTERP_API bool mxIsUint32 (const mxArray *ptr);
236 extern OCTINTERP_API bool mxIsUint64 (const mxArray *ptr);
237 extern OCTINTERP_API bool mxIsUint8 (const mxArray *ptr);
238 
239 /* Odd type+size predicate. */
240 extern OCTINTERP_API bool mxIsLogicalScalar (const mxArray *ptr);
241 
242 /* Odd type+size+value predicate. */
243 extern OCTINTERP_API bool mxIsLogicalScalarTrue (const mxArray *ptr);
244 
245 /* Size predicates. */
246 extern OCTINTERP_API bool mxIsEmpty (const mxArray *ptr);
247 extern OCTINTERP_API bool mxIsScalar (const mxArray *ptr);
248 
249 /* Just plain odd thing to ask of a value. */
250 extern OCTINTERP_API bool mxIsFromGlobalWS (const mxArray *ptr);
251 
252 /* Dimension extractors. */
253 extern OCTINTERP_API size_t mxGetM (const mxArray *ptr);
254 extern OCTINTERP_API size_t mxGetN (const mxArray *ptr);
255 extern OCTINTERP_API const mwSize * mxGetDimensions (const mxArray *ptr);
256 extern OCTINTERP_API mwSize mxGetNumberOfDimensions (const mxArray *ptr);
257 extern OCTINTERP_API size_t mxGetNumberOfElements (const mxArray *ptr);
258 
259 /* Dimension setters. */
260 extern OCTINTERP_API void mxSetM (mxArray *ptr, mwSize M);
261 extern OCTINTERP_API void mxSetN (mxArray *ptr, mwSize N);
262 extern OCTINTERP_API int mxSetDimensions (mxArray *ptr, const mwSize *dims,
263  mwSize ndims);
264 
265 #if MX_HAS_INTERLEAVED_COMPLEX
266 extern OCTINTERP_API int mxMakeArrayReal (mxArray *ptr);
267 extern OCTINTERP_API int mxMakeArrayComplex (mxArray *ptr);
268 #endif
269 
270 /* Data extractors. */
271 extern OCTINTERP_API double * mxGetPr (const mxArray *ptr);
272 extern OCTINTERP_API double mxGetScalar (const mxArray *ptr);
273 extern OCTINTERP_API mxChar * mxGetChars (const mxArray *ptr);
274 extern OCTINTERP_API mxLogical * mxGetLogicals (const mxArray *ptr);
275 extern OCTINTERP_API void * mxGetData (const mxArray *ptr);
276 #if MX_HAS_INTERLEAVED_COMPLEX
277 extern OCTINTERP_API mxDouble * mxGetDoubles (const mxArray *p);
278 extern OCTINTERP_API mxSingle * mxGetSingles (const mxArray *p);
279 extern OCTINTERP_API mxInt8 * mxGetInt8s (const mxArray *p);
280 extern OCTINTERP_API mxInt16 * mxGetInt16s (const mxArray *p);
281 extern OCTINTERP_API mxInt32 * mxGetInt32s (const mxArray *p);
282 extern OCTINTERP_API mxInt64 * mxGetInt64s (const mxArray *p);
283 extern OCTINTERP_API mxUint8 * mxGetUint8s (const mxArray *p);
284 extern OCTINTERP_API mxUint16 * mxGetUint16s (const mxArray *p);
285 extern OCTINTERP_API mxUint32 * mxGetUint32s (const mxArray *p);
286 extern OCTINTERP_API mxUint64 * mxGetUint64s (const mxArray *p);
287 
288 extern OCTINTERP_API mxComplexDouble * mxGetComplexDoubles (const mxArray *p);
289 extern OCTINTERP_API mxComplexSingle * mxGetComplexSingles (const mxArray *p);
290 #else
291 extern OCTINTERP_API double * mxGetPi (const mxArray *ptr);
292 extern OCTINTERP_API void * mxGetImagData (const mxArray *ptr);
293 #endif
294 
295 /* Data setters. */
296 extern OCTINTERP_API void mxSetPr (mxArray *ptr, double *pr);
297 extern OCTINTERP_API void mxSetData (mxArray *ptr, void *data);
298 #if MX_HAS_INTERLEAVED_COMPLEX
299 extern OCTINTERP_API int mxSetDoubles (mxArray *p, mxDouble *d);
300 extern OCTINTERP_API int mxSetSingles (mxArray *p, mxSingle *d);
301 extern OCTINTERP_API int mxSetInt8s (mxArray *p, mxInt8 *d);
302 extern OCTINTERP_API int mxSetInt16s (mxArray *p, mxInt16 *d);
303 extern OCTINTERP_API int mxSetInt32s (mxArray *p, mxInt32 *d);
304 extern OCTINTERP_API int mxSetInt64s (mxArray *p, mxInt64 *d);
305 extern OCTINTERP_API int mxSetUint8s (mxArray *p, mxUint8 *d);
306 extern OCTINTERP_API int mxSetUint16s (mxArray *p, mxUint16 *d);
307 extern OCTINTERP_API int mxSetUint32s (mxArray *p, mxUint32 *d);
308 extern OCTINTERP_API int mxSetUint64s (mxArray *p, mxUint64 *d);
309 
310 extern OCTINTERP_API int mxSetComplexDoubles (mxArray *p, mxComplexDouble *d);
311 extern OCTINTERP_API int mxSetComplexSingles (mxArray *p, mxComplexSingle *d);
312 #else
313 extern OCTINTERP_API void mxSetPi (mxArray *ptr, double *pi);
314 extern OCTINTERP_API void mxSetImagData (mxArray *ptr, void *pi);
315 #endif
316 
317 /* Classes. */
318 extern OCTINTERP_API mxClassID mxGetClassID (const mxArray *ptr);
319 extern OCTINTERP_API const char * mxGetClassName (const mxArray *ptr);
320 extern OCTINTERP_API void mxSetClassName (mxArray *ptr, const char *name);
321 extern OCTINTERP_API mxArray *mxGetProperty (const mxArray *ptr, mwIndex idx,
322  const char *property_name);
323 extern OCTINTERP_API void mxSetProperty (mxArray *ptr, mwIndex idx,
324  const char *property_name,
325  const mxArray *property_value);
326 
327 /* Cell support. */
328 extern OCTINTERP_API mxArray * mxGetCell (const mxArray *ptr, mwIndex idx);
329 
330 extern OCTINTERP_API void mxSetCell (mxArray *ptr, mwIndex idx, mxArray *val);
331 
332 /* Sparse support. */
333 extern OCTINTERP_API mwIndex * mxGetIr (const mxArray *ptr);
334 extern OCTINTERP_API mwIndex * mxGetJc (const mxArray *ptr);
335 extern OCTINTERP_API mwSize mxGetNzmax (const mxArray *ptr);
336 
337 extern OCTINTERP_API void mxSetIr (mxArray *ptr, mwIndex *ir);
338 extern OCTINTERP_API void mxSetJc (mxArray *ptr, mwIndex *jc);
339 extern OCTINTERP_API void mxSetNzmax (mxArray *ptr, mwSize nzmax);
340 
341 /* Structure support. */
342 extern OCTINTERP_API int mxAddField (mxArray *ptr, const char *key);
343 
344 extern OCTINTERP_API void mxRemoveField (mxArray *ptr, int key_num);
345 
346 extern OCTINTERP_API mxArray *mxGetField (const mxArray *ptr, mwIndex index,
347  const char *key);
348 extern OCTINTERP_API mxArray *mxGetFieldByNumber (const mxArray *ptr,
349  mwIndex index, int key_num);
350 
351 extern OCTINTERP_API void mxSetField (mxArray *ptr, mwIndex index,
352  const char *key, mxArray *val);
353 extern OCTINTERP_API void mxSetFieldByNumber (mxArray *ptr, mwIndex index,
354  int key_num, mxArray *val);
355 
356 extern OCTINTERP_API int mxGetNumberOfFields (const mxArray *ptr);
357 
358 extern OCTINTERP_API const char *mxGetFieldNameByNumber (const mxArray *ptr,
359  int key_num);
360 extern OCTINTERP_API int mxGetFieldNumber (const mxArray *ptr, const char *key);
361 
362 extern OCTINTERP_API int mxGetString (const mxArray *ptr, char *buf,
363  mwSize buflen);
364 extern OCTINTERP_API char * mxArrayToString (const mxArray *ptr);
365 
366 /* Miscellaneous. */
367 extern OCTINTERP_API mwIndex mxCalcSingleSubscript (const mxArray *ptr,
368  mwSize nsubs,
369  mwIndex *subs);
370 
371 extern OCTINTERP_API size_t mxGetElementSize (const mxArray *ptr);
372 
373 #if defined (MEX_DEBUG)
374 
375 # define mxAssert(expr, msg) \
376  do \
377  { \
378  if (! (expr)) \
379  { \
380  if (msg && msg[0]) \
381  mexErrMsgIdAndTxt \
382  ("Octave:MEX", \
383  "Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
384  #expr, __LINE__, __FILE__, msg); \
385  else \
386  mexErrMsgIdAndTxt \
387  ("Octave:MEX", \
388  "Assertion failed: %s, at line %d of file \"%s\".\n", \
389  #expr, __LINE__, __FILE__); \
390  } \
391  } \
392  while (0)
393 
394 # define mxAssertS(expr, msg) \
395  do \
396  { \
397  if (! (expr)) \
398  { \
399  if (msg && msg[0]) \
400  mexErrMsgIdAndTxt \
401  ("Octave:MEX", \
402  "Assertion failed at line %d of file \"%s\".\n%s\n", \
403  __LINE__, __FILE__, msg); \
404  else \
405  mexErrMsgIdAndTxt \
406  ("Octave:MEX", \
407  "Assertion failed at line %d of file \"%s\".\n", \
408  __LINE__, __FILE__); \
409  } \
410  } \
411  while (0)
412 
413 #else
414 # define mxAssert(expr, msg)
415 # define mxAssertS(expr, msg)
416 #endif
417 
418 #if defined (__cplusplus)
419 }
420 #endif
421 
422 #endif
F77_RET_T const F77_INT & N
F77_RET_T const F77_INT const F77_INT const F77_INT const F77_DBLE const F77_DBLE F77_INT & M
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE const F77_DBLE * f
mxUint16 * mxGetUint16s(const mxArray *p)
Definition: mex.cc:4171
int mxSetDoubles(mxArray *p, mxDouble *d)
Definition: mex.cc:4214
mxDouble * mxGetDoubles(const mxArray *p)
Definition: mex.cc:4129
int mxSetUint8s(mxArray *p, mxUint8 *d)
Definition: mex.cc:4250
int mxSetInt16s(mxArray *p, mxInt16 *d)
Definition: mex.cc:4232
mxInt64 * mxGetInt64s(const mxArray *p)
Definition: mex.cc:4159
int mxSetComplexDoubles(mxArray *p, mxComplexDouble *d)
Definition: mex.cc:4274
mxUint64 * mxGetUint64s(const mxArray *p)
Definition: mex.cc:4183
mxComplexDouble * mxGetComplexDoubles(const mxArray *p)
Definition: mex.cc:4189
int mxSetUint32s(mxArray *p, mxUint32 *d)
Definition: mex.cc:4262
int mxSetInt8s(mxArray *p, mxInt8 *d)
Definition: mex.cc:4226
int mxSetUint16s(mxArray *p, mxUint16 *d)
Definition: mex.cc:4256
mxSingle * mxGetSingles(const mxArray *p)
Definition: mex.cc:4135
int mxSetInt32s(mxArray *p, mxInt32 *d)
Definition: mex.cc:4238
mxInt16 * mxGetInt16s(const mxArray *p)
Definition: mex.cc:4147
int mxSetUint64s(mxArray *p, mxUint64 *d)
Definition: mex.cc:4268
mxInt8 * mxGetInt8s(const mxArray *p)
Definition: mex.cc:4141
mxComplexSingle * mxGetComplexSingles(const mxArray *p)
Definition: mex.cc:4195
int mxMakeArrayReal(mxArray *ptr)
mxUint8 * mxGetUint8s(const mxArray *p)
Definition: mex.cc:4165
int mxMakeArrayComplex(mxArray *ptr)
mxInt32 * mxGetInt32s(const mxArray *p)
Definition: mex.cc:4153
int mxSetInt64s(mxArray *p, mxInt64 *d)
Definition: mex.cc:4244
int mxSetComplexSingles(mxArray *p, mxComplexSingle *d)
Definition: mex.cc:4280
mxUint32 * mxGetUint32s(const mxArray *p)
Definition: mex.cc:4177
int mxSetSingles(mxArray *p, mxSingle *d)
Definition: mex.cc:4220
void mxSetIr(mxArray *ptr, mwIndex *ir)
Definition: mex.cc:4362
void mxSetCell(mxArray *ptr, mwIndex idx, mxArray *val)
Definition: mex.cc:4337
bool mxIsUint16(const mxArray *ptr)
Definition: mex.cc:3970
mxArray * mxCreateCellMatrix(mwSize m, mwSize n)
Definition: mex.cc:3650
size_t mxGetN(const mxArray *ptr)
Definition: mex.cc:4038
mxArray * mxCreateStructMatrix(mwSize rows, mwSize cols, int num_keys, const char **keys)
Definition: mex.cc:3857
void * mxGetData(const mxArray *ptr)
Definition: mex.cc:4111
mwIndex mxCalcSingleSubscript(const mxArray *ptr, mwSize nsubs, mwIndex *subs)
Definition: mex.cc:4449
bool mxIsFunctionHandle(const mxArray *ptr)
Definition: mex.cc:3910
bool mxIsStruct(const mxArray *ptr)
Definition: mex.cc:3964
double * mxGetPi(const mxArray *ptr)
Definition: mex.cc:4117
int mxGetFieldNumber(const mxArray *ptr, const char *key)
Definition: mex.cc:4431
void mexErrMsgTxt(const char *s)
Definition: mex.cc:4744
void mxSetData(mxArray *ptr, void *data)
Definition: mex.cc:4208
void mxSetField(mxArray *ptr, mwIndex index, const char *key, mxArray *val)
Definition: mex.cc:4406
size_t mxGetNumberOfElements(const mxArray *ptr)
Definition: mex.cc:4056
bool mxIsUint32(const mxArray *ptr)
Definition: mex.cc:3976
void mxSetProperty(mxArray *ptr, mwIndex idx, const char *property_name, const mxArray *property_value)
Definition: mex.cc:4317
bool mxIsComplex(const mxArray *ptr)
Definition: mex.cc:3898
bool mxIsNaN(double v)
Definition: mex.cc:3572
int mexAtExit(void(*f)(void))
Definition: mex.cc:4988
mxArray * mxCreateUninitNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:3776
size_t mxGetElementSize(const mxArray *ptr)
Definition: mex.cc:4455
bool mxIsScalar(const mxArray *ptr)
Definition: mex.cc:4015
mxArray * mxCreateLogicalArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:3710
void mxSetFieldByNumber(mxArray *ptr, mwIndex index, int key_num, mxArray *val)
Definition: mex.cc:4413
const char * mxGetClassName(const mxArray *ptr)
Definition: mex.cc:4305
void * mxMalloc(size_t n)
bool mxIsLogicalScalarTrue(const mxArray *ptr)
Definition: mex.cc:4002
bool mxIsInf(double v)
Definition: mex.cc:3566
mxArray * mxCreateLogicalScalar(mxLogical val)
Definition: mex.cc:3734
mxArray * mxCreateDoubleMatrix(mwSize nr, mwSize nc, mxComplexity flag)
Definition: mex.cc:3686
void mexWarnMsgIdAndTxt(const char *id, const char *s,...)
Definition: mex.cc:4812
mxClassID mxGetClassID(const mxArray *ptr)
Definition: mex.cc:4299
bool mxIsLogical(const mxArray *ptr)
Definition: mex.cc:3940
mxArray * mxGetProperty(const mxArray *ptr, mwIndex idx, const char *property_name)
Definition: mex.cc:4324
mxArray * mxCreateCellArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:3638
void mexWarnMsgTxt(const char *s)
Definition: mex.cc:4789
const char * mexFunctionName(void)
Definition: mex.cc:4544
void * mxCalloc(size_t n, size_t size)
mwIndex * mxGetIr(const mxArray *ptr)
Definition: mex.cc:4344
bool mxIsInt64(const mxArray *ptr)
Definition: mex.cc:3928
mxArray * mxGetFieldByNumber(const mxArray *ptr, mwIndex index, int key_num)
Definition: mex.cc:4400
mxArray * mexCallMATLABWithTrap(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
Definition: mex.cc:4646
int mxSetDimensions(mxArray *ptr, const mwSize *dims, mwSize ndims)
Definition: mex.cc:4075
int mexPrintf(const char *fmt,...)
Definition: mex.cc:4831
bool mxIsChar(const mxArray *ptr)
Definition: mex.cc:3886
mxArray * mxCreateUninitNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:3791
bool mxIsUint8(const mxArray *ptr)
Definition: mex.cc:3988
void mxSetNzmax(mxArray *ptr, mwSize nzmax)
Definition: mex.cc:4374
bool mxIsSingle(const mxArray *ptr)
Definition: mex.cc:3952
void mxSetN(mxArray *ptr, mwSize N)
Definition: mex.cc:4069
int mxAddField(mxArray *ptr, const char *key)
Definition: mex.cc:4381
void mexMakeMemoryPersistent(void *ptr)
Definition: mex.cc:4982
bool mxIsInt8(const mxArray *ptr)
Definition: mex.cc:3934
void mxSetImagData(mxArray *ptr, void *pi)
Definition: mex.cc:4292
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
int mexCallMATLAB(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
Definition: mex.cc:4579
void mxSetPr(mxArray *ptr, double *pr)
Definition: mex.cc:4202
mxArray * mxCreateSparseLogicalMatrix(mwSize m, mwSize n, mwSize nzmax)
Definition: mex.cc:3818
mxArray * mexEvalStringWithTrap(const char *s)
Definition: mex.cc:4706
mxArray * mexGetVariable(const char *space, const char *name)
Definition: mex.cc:4842
mxArray * mxCreateStructArray(mwSize ndims, const mwSize *dims, int num_keys, const char **keys)
Definition: mex.cc:3843
bool mxIsClass(const mxArray *ptr, const char *name)
Definition: mex.cc:3892
int mxGetNumberOfFields(const mxArray *ptr)
Definition: mex.cc:4419
mxArray * mxCreateCharArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:3662
mwIndex * mxGetJc(const mxArray *ptr)
Definition: mex.cc:4350
int mexPutVariable(const char *space, const char *name, const mxArray *ptr)
Definition: mex.cc:4899
bool mxIsInt32(const mxArray *ptr)
Definition: mex.cc:3922
void mexUnlock(void)
Definition: mex.cc:5093
mxArray * mxCreateCharMatrixFromStrings(mwSize m, const char **str)
Definition: mex.cc:3674
int mexIsGlobal(const mxArray *ptr)
Definition: mex.cc:5029
void mxSetJc(mxArray *ptr, mwIndex *jc)
Definition: mex.cc:4368
bool mxIsInt16(const mxArray *ptr)
Definition: mex.cc:3916
const mwSize * mxGetDimensions(const mxArray *ptr)
Definition: mex.cc:4044
int mexEvalString(const char *s)
Definition: mex.cc:4677
void mexSetTrapFlag(int flag)
Definition: mex.cc:4670
mwSize mxGetNzmax(const mxArray *ptr)
Definition: mex.cc:4356
void mxSetClassName(mxArray *ptr, const char *name)
Definition: mex.cc:4311
const mxArray * mexGetVariablePtr(const char *space, const char *name)
Definition: mex.cc:4893
bool mxIsNumeric(const mxArray *ptr)
Definition: mex.cc:3946
mxArray * mxCreateNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:3761
int mexIsLocked(void)
Definition: mex.cc:5035
void mxDestroyArray(mxArray *v)
Definition: mex.cc:3872
bool mxIsCell(const mxArray *ptr)
Definition: mex.cc:3880
void mxSetM(mxArray *ptr, mwSize M)
Definition: mex.cc:4063
void mexMakeArrayPersistent(mxArray *ptr)
Definition: mex.cc:4976
double mxGetScalar(const mxArray *ptr)
Definition: mex.cc:4090
bool mxIsFromGlobalWS(const mxArray *ptr)
Definition: mex.cc:4023
void mxRemoveField(mxArray *ptr, int key_num)
Definition: mex.cc:4387
size_t mxGetM(const mxArray *ptr)
Definition: mex.cc:4032
mxArray * mxCreateDoubleScalar(double val)
Definition: mex.cc:3698
int mxGetString(const mxArray *ptr, char *buf, mwSize buflen)
Definition: mex.cc:4437
const char * mxGetFieldNameByNumber(const mxArray *ptr, int key_num)
Definition: mex.cc:4425
bool mxIsLogicalScalar(const mxArray *ptr)
Definition: mex.cc:3995
double mxGetInf(void)
Definition: mex.cc:3584
double mxGetNaN(void)
Definition: mex.cc:3590
mxArray * mxCreateLogicalMatrix(mwSize m, mwSize n)
Definition: mex.cc:3722
mwSize mxGetNumberOfDimensions(const mxArray *ptr)
Definition: mex.cc:4050
mxLogical * mxGetLogicals(const mxArray *ptr)
Definition: mex.cc:4105
double mxGetEps(void)
Definition: mex.cc:3578
double * mxGetPr(const mxArray *ptr)
Definition: mex.cc:4084
int mexSet(double handle, const char *property, mxArray *val)
Definition: mex.cc:5072
void mexLock(void)
Definition: mex.cc:5054
const mxArray * mexGet(double handle, const char *property)
Definition: mex.cc:5015
bool mxIsEmpty(const mxArray *ptr)
Definition: mex.cc:4009
mxArray * mxGetField(const mxArray *ptr, mwIndex index, const char *key)
Definition: mex.cc:4393
char * mxArrayToString(const mxArray *ptr)
Definition: mex.cc:4443
bool mxIsFinite(double v)
Definition: mex.cc:3560
void * mxGetImagData(const mxArray *ptr)
Definition: mex.cc:4123
void mxFree(void *ptr)
Definition: mex.cc:3616
mxChar * mxGetChars(const mxArray *ptr)
Definition: mex.cc:4096
mxArray * mxCreateSparse(mwSize m, mwSize n, mwSize nzmax, mxComplexity flag)
Definition: mex.cc:3805
void mexErrMsgIdAndTxt(const char *id, const char *s,...)
Definition: mex.cc:4767
bool mxIsSparse(const mxArray *ptr)
Definition: mex.cc:3958
bool mxIsUint64(const mxArray *ptr)
Definition: mex.cc:3982
mxArray * mxDuplicateArray(const mxArray *v)
Definition: mex.cc:3865
mxArray * mxCreateNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:3747
bool mxIsDouble(const mxArray *ptr)
Definition: mex.cc:3904
mxArray * mxGetCell(const mxArray *ptr, mwIndex idx)
Definition: mex.cc:4331
void mxSetPi(mxArray *ptr, double *pi)
Definition: mex.cc:4286
mxArray * mxCreateString(const char *str)
Definition: mex.cc:3830
void * mxRealloc(void *ptr, size_t size)
T octave_idx_type m
Definition: mx-inlines.cc:781
octave_idx_type n
Definition: mx-inlines.cc:761
int16_t mxInt16
Definition: mxtypes.h:95
char mxChar
Definition: mxtypes.h:87
uint64_t mxUint64
Definition: mxtypes.h:102
int32_t mxInt32
Definition: mxtypes.h:96
float mxSingle
Definition: mxtypes.h:92
mxClassID
Definition: mxtypes.h:57
int64_t mxInt64
Definition: mxtypes.h:97
int64_t mwIndex
Definition: mxtypes.h:125
double mxDouble
Definition: mxtypes.h:91
mxComplexity
Definition: mxtypes.h:79
uint32_t mxUint32
Definition: mxtypes.h:101
uint8_t mxUint8
Definition: mxtypes.h:99
uint16_t mxUint16
Definition: mxtypes.h:100
int8_t mxInt8
Definition: mxtypes.h:94
unsigned char mxLogical
Definition: mxtypes.h:89
int64_t mwSize
Definition: mxtypes.h:124