GNU Octave  8.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-2023 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 #if 0
291 /* We don't have these yet. */
292 extern OCTINTERP_API mxComplexInt8 * mxGetComplexInt8s (const mxArray *p);
293 extern OCTINTERP_API mxComplexInt16 * mxGetComplexInt16s (const mxArray *p);
294 extern OCTINTERP_API mxComplexInt32 * mxGetComplexInt32s (const mxArray *p);
295 extern OCTINTERP_API mxComplexInt64 * mxGetComplexInt64s (const mxArray *p);
296 extern OCTINTERP_API mxComplexUint8 * mxGetComplexUint8s (const mxArray *p);
297 extern OCTINTERP_API mxComplexUint16 * mxGetComplexUint16s (const mxArray *p);
298 extern OCTINTERP_API mxComplexUint32 * mxGetComplexUint32s (const mxArray *p);
299 extern OCTINTERP_API mxComplexUint64 * mxGetComplexUint64s (const mxArray *p);
300 #endif
301 #else
302 extern OCTINTERP_API double * mxGetPi (const mxArray *ptr);
303 extern OCTINTERP_API void * mxGetImagData (const mxArray *ptr);
304 #endif
305 
306 /* Data setters. */
307 extern OCTINTERP_API void mxSetPr (mxArray *ptr, double *pr);
308 extern OCTINTERP_API void mxSetData (mxArray *ptr, void *data);
309 #if MX_HAS_INTERLEAVED_COMPLEX
310 extern OCTINTERP_API int mxSetDoubles (mxArray *p, mxDouble *d);
311 extern OCTINTERP_API int mxSetSingles (mxArray *p, mxSingle *d);
312 extern OCTINTERP_API int mxSetInt8s (mxArray *p, mxInt8 *d);
313 extern OCTINTERP_API int mxSetInt16s (mxArray *p, mxInt16 *d);
314 extern OCTINTERP_API int mxSetInt32s (mxArray *p, mxInt32 *d);
315 extern OCTINTERP_API int mxSetInt64s (mxArray *p, mxInt64 *d);
316 extern OCTINTERP_API int mxSetUint8s (mxArray *p, mxUint8 *d);
317 extern OCTINTERP_API int mxSetUint16s (mxArray *p, mxUint16 *d);
318 extern OCTINTERP_API int mxSetUint32s (mxArray *p, mxUint32 *d);
319 extern OCTINTERP_API int mxSetUint64s (mxArray *p, mxUint64 *d);
320 
321 extern OCTINTERP_API int mxSetComplexDoubles (mxArray *p, mxComplexDouble *d);
322 extern OCTINTERP_API int mxSetComplexSingles (mxArray *p, mxComplexSingle *d);
323 #if 0
324 /* We don't have these yet. */
325 extern OCTINTERP_API int mxSetComplexInt8s (mxArray *p, mxComplexInt8 *d);
326 extern OCTINTERP_API int mxSetComplexInt16s (mxArray *p, mxComplexInt16 *d);
327 extern OCTINTERP_API int mxSetComplexInt32s (mxArray *p, mxComplexInt32 *d);
328 extern OCTINTERP_API int mxSetComplexInt64s (mxArray *p, mxComplexInt64 *d);
329 extern OCTINTERP_API int mxSetComplexUint8s (mxArray *p, mxComplexUint8 *d);
330 extern OCTINTERP_API int mxSetComplexUint16s (mxArray *p, mxComplexUint16 *d);
331 extern OCTINTERP_API int mxSetComplexUint32s (mxArray *p, mxComplexUint32 *d);
332 extern OCTINTERP_API int mxSetComplexUint64s (mxArray *p, mxComplexUint64 *d);
333 #endif
334 #else
335 extern OCTINTERP_API void mxSetPi (mxArray *ptr, double *pi);
336 extern OCTINTERP_API void mxSetImagData (mxArray *ptr, void *pi);
337 #endif
338 
339 /* Classes. */
340 extern OCTINTERP_API mxClassID mxGetClassID (const mxArray *ptr);
341 extern OCTINTERP_API const char * mxGetClassName (const mxArray *ptr);
342 extern OCTINTERP_API void mxSetClassName (mxArray *ptr, const char *name);
343 extern OCTINTERP_API mxArray *mxGetProperty (const mxArray *ptr, mwIndex idx,
344  const char *property_name);
345 extern OCTINTERP_API void mxSetProperty (mxArray *ptr, mwIndex idx,
346  const char *property_name,
347  const mxArray *property_value);
348 
349 /* Cell support. */
350 extern OCTINTERP_API mxArray * mxGetCell (const mxArray *ptr, mwIndex idx);
351 
352 extern OCTINTERP_API void mxSetCell (mxArray *ptr, mwIndex idx, mxArray *val);
353 
354 /* Sparse support. */
355 extern OCTINTERP_API mwIndex * mxGetIr (const mxArray *ptr);
356 extern OCTINTERP_API mwIndex * mxGetJc (const mxArray *ptr);
357 extern OCTINTERP_API mwSize mxGetNzmax (const mxArray *ptr);
358 
359 extern OCTINTERP_API void mxSetIr (mxArray *ptr, mwIndex *ir);
360 extern OCTINTERP_API void mxSetJc (mxArray *ptr, mwIndex *jc);
361 extern OCTINTERP_API void mxSetNzmax (mxArray *ptr, mwSize nzmax);
362 
363 /* Structure support. */
364 extern OCTINTERP_API int mxAddField (mxArray *ptr, const char *key);
365 
366 extern OCTINTERP_API void mxRemoveField (mxArray *ptr, int key_num);
367 
368 extern OCTINTERP_API mxArray *mxGetField (const mxArray *ptr, mwIndex index,
369  const char *key);
370 extern OCTINTERP_API mxArray *mxGetFieldByNumber (const mxArray *ptr,
371  mwIndex index, int key_num);
372 
373 extern OCTINTERP_API void mxSetField (mxArray *ptr, mwIndex index,
374  const char *key, mxArray *val);
375 extern OCTINTERP_API void mxSetFieldByNumber (mxArray *ptr, mwIndex index,
376  int key_num, mxArray *val);
377 
378 extern OCTINTERP_API int mxGetNumberOfFields (const mxArray *ptr);
379 
380 extern OCTINTERP_API const char *mxGetFieldNameByNumber (const mxArray *ptr,
381  int key_num);
382 extern OCTINTERP_API int mxGetFieldNumber (const mxArray *ptr, const char *key);
383 
384 extern OCTINTERP_API int mxGetString (const mxArray *ptr, char *buf,
385  mwSize buflen);
386 extern OCTINTERP_API char * mxArrayToString (const mxArray *ptr);
387 
388 /* Miscellaneous. */
389 extern OCTINTERP_API mwIndex mxCalcSingleSubscript (const mxArray *ptr,
390  mwSize nsubs,
391  mwIndex *subs);
392 
393 extern OCTINTERP_API size_t mxGetElementSize (const mxArray *ptr);
394 
395 #if defined (MEX_DEBUG)
396 
397 # define mxAssert(expr, msg) \
398  do \
399  { \
400  if (! (expr)) \
401  { \
402  if (msg && msg[0]) \
403  mexErrMsgIdAndTxt \
404  ("Octave:MEX", \
405  "Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
406  #expr, __LINE__, __FILE__, msg); \
407  else \
408  mexErrMsgIdAndTxt \
409  ("Octave:MEX", \
410  "Assertion failed: %s, at line %d of file \"%s\".\n", \
411  #expr, __LINE__, __FILE__); \
412  } \
413  } \
414  while (0)
415 
416 # define mxAssertS(expr, msg) \
417  do \
418  { \
419  if (! (expr)) \
420  { \
421  if (msg && msg[0]) \
422  mexErrMsgIdAndTxt \
423  ("Octave:MEX", \
424  "Assertion failed at line %d of file \"%s\".\n%s\n", \
425  __LINE__, __FILE__, msg); \
426  else \
427  mexErrMsgIdAndTxt \
428  ("Octave:MEX", \
429  "Assertion failed at line %d of file \"%s\".\n", \
430  __LINE__, __FILE__); \
431  } \
432  } \
433  while (0)
434 
435 #else
436 # define mxAssert(expr, msg)
437 # define mxAssertS(expr, msg)
438 #endif
439 
440 #if defined (__cplusplus)
441 }
442 #endif
443 
444 #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
static const double pi
Definition: lo-specfun.cc:1944
OCTINTERP_API mxUint16 * mxGetUint16s(const mxArray *p)
Definition: mex.cc:4419
OCTINTERP_API int mxSetDoubles(mxArray *p, mxDouble *d)
Definition: mex.cc:4500
OCTINTERP_API mxDouble * mxGetDoubles(const mxArray *p)
Definition: mex.cc:4384
OCTINTERP_API int mxSetUint8s(mxArray *p, mxUint8 *d)
Definition: mex.cc:4530
OCTINTERP_API int mxSetInt16s(mxArray *p, mxInt16 *d)
Definition: mex.cc:4515
OCTINTERP_API mxInt64 * mxGetInt64s(const mxArray *p)
Definition: mex.cc:4409
OCTINTERP_API int mxSetComplexDoubles(mxArray *p, mxComplexDouble *d)
Definition: mex.cc:4550
OCTINTERP_API mxUint64 * mxGetUint64s(const mxArray *p)
Definition: mex.cc:4429
OCTINTERP_API mxComplexDouble * mxGetComplexDoubles(const mxArray *p)
Definition: mex.cc:4434
OCTINTERP_API int mxSetUint32s(mxArray *p, mxUint32 *d)
Definition: mex.cc:4540
OCTINTERP_API int mxSetInt8s(mxArray *p, mxInt8 *d)
Definition: mex.cc:4510
OCTINTERP_API int mxSetUint16s(mxArray *p, mxUint16 *d)
Definition: mex.cc:4535
OCTINTERP_API mxSingle * mxGetSingles(const mxArray *p)
Definition: mex.cc:4389
OCTINTERP_API int mxSetInt32s(mxArray *p, mxInt32 *d)
Definition: mex.cc:4520
OCTINTERP_API mxInt16 * mxGetInt16s(const mxArray *p)
Definition: mex.cc:4399
OCTINTERP_API int mxSetUint64s(mxArray *p, mxUint64 *d)
Definition: mex.cc:4545
OCTINTERP_API mxInt8 * mxGetInt8s(const mxArray *p)
Definition: mex.cc:4394
OCTINTERP_API mxComplexSingle * mxGetComplexSingles(const mxArray *p)
Definition: mex.cc:4439
OCTINTERP_API mxUint8 * mxGetUint8s(const mxArray *p)
Definition: mex.cc:4414
OCTINTERP_API mxInt32 * mxGetInt32s(const mxArray *p)
Definition: mex.cc:4404
OCTINTERP_API int mxSetInt64s(mxArray *p, mxInt64 *d)
Definition: mex.cc:4525
OCTINTERP_API int mxSetComplexSingles(mxArray *p, mxComplexSingle *d)
Definition: mex.cc:4555
OCTINTERP_API mxUint32 * mxGetUint32s(const mxArray *p)
Definition: mex.cc:4424
OCTINTERP_API int mxMakeArrayComplex(mxArray *ptr)
OCTINTERP_API int mxMakeArrayReal(mxArray *ptr)
OCTINTERP_API int mxSetSingles(mxArray *p, mxSingle *d)
Definition: mex.cc:4505
OCTINTERP_API double mxGetNaN(void)
Definition: mex.cc:3846
OCTINTERP_API bool mxIsStruct(const mxArray *ptr)
Definition: mex.cc:4220
OCTINTERP_API bool mxIsScalar(const mxArray *ptr)
Definition: mex.cc:4271
OCTINTERP_API mwSize mxGetNumberOfDimensions(const mxArray *ptr)
Definition: mex.cc:4306
OCTINTERP_API mxArray * mexEvalStringWithTrap(const char *s)
Definition: mex.cc:5024
OCTINTERP_API double mxGetScalar(const mxArray *ptr)
Definition: mex.cc:4346
OCTINTERP_API int mxGetNumberOfFields(const mxArray *ptr)
Definition: mex.cc:4737
OCTINTERP_API double * mxGetPr(const mxArray *ptr)
Definition: mex.cc:4340
OCTINTERP_API mxArray * mxCreateStructMatrix(mwSize rows, mwSize cols, int num_keys, const char **keys)
Definition: mex.cc:4113
OCTINTERP_API mxLogical * mxGetLogicals(const mxArray *ptr)
Definition: mex.cc:4361
OCTINTERP_API void * mxMalloc(size_t n)
OCTINTERP_API bool mxIsSparse(const mxArray *ptr)
Definition: mex.cc:4214
OCTINTERP_API const mxArray * mexGetVariablePtr(const char *space, const char *name)
Definition: mex.cc:5211
OCTINTERP_API bool mxIsLogicalScalarTrue(const mxArray *ptr)
Definition: mex.cc:4258
OCTINTERP_API void mxSetData(mxArray *ptr, void *data)
Definition: mex.cc:4495
OCTINTERP_API mxArray * mxGetFieldByNumber(const mxArray *ptr, mwIndex index, int key_num)
Definition: mex.cc:4718
OCTINTERP_API bool mxIsUint16(const mxArray *ptr)
Definition: mex.cc:4226
OCTINTERP_API size_t mxGetElementSize(const mxArray *ptr)
Definition: mex.cc:4773
OCTINTERP_API size_t mxGetNumberOfElements(const mxArray *ptr)
Definition: mex.cc:4312
OCTINTERP_API mxArray * mxCreateSparse(mwSize m, mwSize n, mwSize nzmax, mxComplexity flag)
Definition: mex.cc:4061
OCTINTERP_API mxArray * mexGetVariable(const char *space, const char *name)
Definition: mex.cc:5160
OCTINTERP_API void mxSetNzmax(mxArray *ptr, mwSize nzmax)
Definition: mex.cc:4692
OCTINTERP_API mxArray * mxCreateUninitNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:4032
OCTINTERP_API mwIndex * mxGetJc(const mxArray *ptr)
Definition: mex.cc:4668
OCTINTERP_API bool mxIsComplex(const mxArray *ptr)
Definition: mex.cc:4154
OCTINTERP_API bool mxIsLogicalScalar(const mxArray *ptr)
Definition: mex.cc:4251
OCTINTERP_API bool mxIsInf(double v)
Definition: mex.cc:3822
OCTINTERP_API mxArray * mxDuplicateArray(const mxArray *v)
Definition: mex.cc:4121
OCTINTERP_API mwSize mxGetNzmax(const mxArray *ptr)
Definition: mex.cc:4674
OCTINTERP_API const char * mxGetClassName(const mxArray *ptr)
Definition: mex.cc:4623
OCTINTERP_API mwIndex * mxGetIr(const mxArray *ptr)
Definition: mex.cc:4662
OCTINTERP_API void mexWarnMsgTxt(const char *s)
Definition: mex.cc:5107
OCTINTERP_API bool mxIsUint64(const mxArray *ptr)
Definition: mex.cc:4238
OCTINTERP_API mwIndex mxCalcSingleSubscript(const mxArray *ptr, mwSize nsubs, mwIndex *subs)
Definition: mex.cc:4767
OCTINTERP_API bool mxIsClass(const mxArray *ptr, const char *name)
Definition: mex.cc:4148
OCTINTERP_API int mexPrintf(const char *fmt,...)
Definition: mex.cc:5149
OCTINTERP_API mxArray * mxCreateStructArray(mwSize ndims, const mwSize *dims, int num_keys, const char **keys)
Definition: mex.cc:4099
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
OCTINTERP_API void mexSetTrapFlag(int flag)
Definition: mex.cc:4988
OCTINTERP_API mxArray * mxCreateCellArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:3894
OCTINTERP_API int mexIsLocked(void)
Definition: mex.cc:5353
OCTINTERP_API mxArray * mxCreateNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:4003
OCTINTERP_API mxArray * mxCreateLogicalArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:3966
OCTINTERP_API mxArray * mxCreateDoubleMatrix(mwSize nr, mwSize nc, mxComplexity flag)
Definition: mex.cc:3942
OCTINTERP_API double * mxGetPi(const mxArray *ptr)
Definition: mex.cc:4373
OCTINTERP_API mxArray * mxCreateSparseLogicalMatrix(mwSize m, mwSize n, mwSize nzmax)
Definition: mex.cc:4074
OCTINTERP_API mxArray * mxCreateDoubleScalar(double val)
Definition: mex.cc:3954
OCTINTERP_API bool mxIsInt16(const mxArray *ptr)
Definition: mex.cc:4172
OCTINTERP_API bool mxIsDouble(const mxArray *ptr)
Definition: mex.cc:4160
OCTINTERP_API void mxDestroyArray(mxArray *v)
Definition: mex.cc:4128
OCTINTERP_API void mxSetFieldByNumber(mxArray *ptr, mwIndex index, int key_num, mxArray *val)
Definition: mex.cc:4731
OCTINTERP_API double mxGetInf(void)
Definition: mex.cc:3840
OCTINTERP_API mxArray * mxCreateUninitNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:4047
OCTINTERP_API bool mxIsEmpty(const mxArray *ptr)
Definition: mex.cc:4265
OCTINTERP_API mxArray * mxGetCell(const mxArray *ptr, mwIndex idx)
Definition: mex.cc:4649
OCTINTERP_API void mxSetField(mxArray *ptr, mwIndex index, const char *key, mxArray *val)
Definition: mex.cc:4724
OCTINTERP_API bool mxIsFinite(double v)
Definition: mex.cc:3816
OCTINTERP_API void * mxCalloc(size_t n, size_t size)
OCTINTERP_API mxArray * mxCreateString(const char *str)
Definition: mex.cc:4086
OCTINTERP_API mxArray * mxGetField(const mxArray *ptr, mwIndex index, const char *key)
Definition: mex.cc:4711
OCTINTERP_API bool mxIsNaN(double v)
Definition: mex.cc:3828
OCTINTERP_API bool mxIsInt8(const mxArray *ptr)
Definition: mex.cc:4190
OCTINTERP_API void mxFree(void *ptr)
Definition: mex.cc:3872
OCTINTERP_API int mexPutVariable(const char *space, const char *name, const mxArray *ptr)
Definition: mex.cc:5217
OCTINTERP_API char * mxArrayToString(const mxArray *ptr)
Definition: mex.cc:4761
OCTINTERP_API mxArray * mexCallMATLABWithTrap(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
Definition: mex.cc:4964
OCTINTERP_API size_t mxGetN(const mxArray *ptr)
Definition: mex.cc:4294
OCTINTERP_API void mxSetPr(mxArray *ptr, double *pr)
Definition: mex.cc:4489
OCTINTERP_API mxArray * mxCreateLogicalScalar(mxLogical val)
Definition: mex.cc:3990
OCTINTERP_API double mxGetEps(void)
Definition: mex.cc:3834
OCTINTERP_API void mxSetImagData(mxArray *ptr, void *pi)
Definition: mex.cc:4610
OCTINTERP_API mxArray * mxCreateCharMatrixFromStrings(mwSize m, const char **str)
Definition: mex.cc:3930
OCTINTERP_API mxArray * mxCreateNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:4017
OCTINTERP_API int mexEvalString(const char *s)
Definition: mex.cc:4995
OCTINTERP_API mxArray * mxGetProperty(const mxArray *ptr, mwIndex idx, const char *property_name)
Definition: mex.cc:4642
OCTINTERP_API mxChar * mxGetChars(const mxArray *ptr)
Definition: mex.cc:4352
OCTINTERP_API void * mxGetData(const mxArray *ptr)
Definition: mex.cc:4367
OCTINTERP_API void mexWarnMsgIdAndTxt(const char *id, const char *s,...)
Definition: mex.cc:5130
OCTINTERP_API mxClassID mxGetClassID(const mxArray *ptr)
Definition: mex.cc:4617
OCTINTERP_API void mexMakeMemoryPersistent(void *ptr)
Definition: mex.cc:5300
OCTINTERP_API void mxSetIr(mxArray *ptr, mwIndex *ir)
Definition: mex.cc:4680
OCTINTERP_API void mexErrMsgIdAndTxt(const char *id, const char *s,...)
Definition: mex.cc:5085
OCTINTERP_API int mxSetDimensions(mxArray *ptr, const mwSize *dims, mwSize ndims)
Definition: mex.cc:4331
OCTINTERP_API int mexSet(double handle, const char *property, mxArray *val)
Definition: mex.cc:5390
OCTINTERP_API bool mxIsCell(const mxArray *ptr)
Definition: mex.cc:4136
OCTINTERP_API void mxRemoveField(mxArray *ptr, int key_num)
Definition: mex.cc:4705
OCTINTERP_API void mexMakeArrayPersistent(mxArray *ptr)
Definition: mex.cc:5294
OCTINTERP_API size_t mxGetM(const mxArray *ptr)
Definition: mex.cc:4288
OCTINTERP_API void mexUnlock(void)
Definition: mex.cc:5411
OCTINTERP_API void * mxRealloc(void *ptr, size_t size)
OCTINTERP_API int mexIsGlobal(const mxArray *ptr)
Definition: mex.cc:5347
OCTINTERP_API mxArray * mxCreateCellMatrix(mwSize m, mwSize n)
Definition: mex.cc:3906
OCTINTERP_API mxArray * mxCreateCharArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:3918
OCTINTERP_API void mxSetPi(mxArray *ptr, double *pi)
Definition: mex.cc:4604
OCTINTERP_API void mexErrMsgTxt(const char *s)
Definition: mex.cc:5062
OCTINTERP_API int mexCallMATLAB(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
Definition: mex.cc:4897
OCTINTERP_API bool mxIsUint8(const mxArray *ptr)
Definition: mex.cc:4244
OCTINTERP_API bool mxIsUint32(const mxArray *ptr)
Definition: mex.cc:4232
OCTINTERP_API const mxArray * mexGet(double handle, const char *property)
Definition: mex.cc:5333
OCTINTERP_API const mwSize * mxGetDimensions(const mxArray *ptr)
Definition: mex.cc:4300
OCTINTERP_API bool mxIsFromGlobalWS(const mxArray *ptr)
Definition: mex.cc:4279
OCTINTERP_API void mxSetClassName(mxArray *ptr, const char *name)
Definition: mex.cc:4629
OCTINTERP_API const char * mexFunctionName(void)
Definition: mex.cc:4862
OCTINTERP_API int mexAtExit(void(*f)(void))
Definition: mex.cc:5306
OCTINTERP_API bool mxIsNumeric(const mxArray *ptr)
Definition: mex.cc:4202
OCTINTERP_API const char * mxGetFieldNameByNumber(const mxArray *ptr, int key_num)
Definition: mex.cc:4743
OCTINTERP_API bool mxIsFunctionHandle(const mxArray *ptr)
Definition: mex.cc:4166
OCTINTERP_API void * mxGetImagData(const mxArray *ptr)
Definition: mex.cc:4379
OCTINTERP_API int mxGetString(const mxArray *ptr, char *buf, mwSize buflen)
Definition: mex.cc:4755
OCTINTERP_API int mxAddField(mxArray *ptr, const char *key)
Definition: mex.cc:4699
OCTINTERP_API void mxSetN(mxArray *ptr, mwSize N)
Definition: mex.cc:4325
OCTINTERP_API void mxSetM(mxArray *ptr, mwSize M)
Definition: mex.cc:4319
OCTINTERP_API bool mxIsLogical(const mxArray *ptr)
Definition: mex.cc:4196
OCTINTERP_API bool mxIsSingle(const mxArray *ptr)
Definition: mex.cc:4208
OCTINTERP_API void mxSetCell(mxArray *ptr, mwIndex idx, mxArray *val)
Definition: mex.cc:4655
OCTINTERP_API bool mxIsInt32(const mxArray *ptr)
Definition: mex.cc:4178
OCTINTERP_API int mxGetFieldNumber(const mxArray *ptr, const char *key)
Definition: mex.cc:4749
OCTINTERP_API void mexLock(void)
Definition: mex.cc:5372
OCTINTERP_API bool mxIsChar(const mxArray *ptr)
Definition: mex.cc:4142
OCTINTERP_API void mxSetJc(mxArray *ptr, mwIndex *jc)
Definition: mex.cc:4686
OCTINTERP_API bool mxIsInt64(const mxArray *ptr)
Definition: mex.cc:4184
OCTINTERP_API mxArray * mxCreateLogicalMatrix(mwSize m, mwSize n)
Definition: mex.cc:3978
OCTINTERP_API void mxSetProperty(mxArray *ptr, mwIndex idx, const char *property_name, const mxArray *property_value)
Definition: mex.cc:4635
T octave_idx_type m
Definition: mx-inlines.cc:773
octave_idx_type n
Definition: mx-inlines.cc:753