GNU Octave  6.2.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-2021 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 extern "C" {
59 #else
60 # include <stdlib.h>
61 # include <stdbool.h>
62 #endif
63 
64 #define MXARRAY_TYPEDEFS_ONLY
65 #include "mxarray.h"
66 #undef MXARRAY_TYPEDEFS_ONLY
67 
68 /* Interface to the interpreter. */
69 extern OCTINTERP_API const char * mexFunctionName (void);
70 
71 extern OCTINTERP_API int mexCallMATLAB (int nargout, mxArray *argout[],
72  int nargin, mxArray *argin[],
73  const char *fname);
74 extern OCTINTERP_API mxArray * mexCallMATLABWithTrap (int nargout,
75  mxArray *argout[],
76  int nargin,
77  mxArray *argin[],
78  const char *fname);
79 
80 extern OCTINTERP_API int mexEvalString (const char *s);
81 extern OCTINTERP_API mxArray * mexEvalStringWithTrap (const char *s);
82 
83 extern OCTINTERP_API void mexSetTrapFlag (int flag);
84 
85 extern OCTINTERP_API void mexErrMsgTxt (const char *s);
86 extern OCTINTERP_API void mexErrMsgIdAndTxt (const char *id, const char *s,
87  ...);
88 extern OCTINTERP_API void mexWarnMsgTxt (const char *s);
89 extern OCTINTERP_API void mexWarnMsgIdAndTxt (const char *id, const char *s,
90  ...);
91 extern OCTINTERP_API int mexPrintf (const char *fmt, ...);
92 
93 extern OCTINTERP_API mxArray * mexGetVariable (const char *space,
94  const char *name);
95 extern OCTINTERP_API const mxArray * mexGetVariablePtr (const char *space,
96  const char *name);
97 
98 extern OCTINTERP_API int mexPutVariable (const char *space, const char *name,
99  const mxArray *ptr);
100 
101 extern OCTINTERP_API const mxArray * mexGet (double handle,
102  const char *property);
103 extern OCTINTERP_API int mexSet (double handle, const char *property,
104  mxArray *val);
105 
106 extern OCTINTERP_API void mexMakeArrayPersistent (mxArray *ptr);
107 extern OCTINTERP_API void mexMakeMemoryPersistent (void *ptr);
108 
109 extern OCTINTERP_API void mexLock (void);
110 extern OCTINTERP_API void mexUnlock (void);
111 
112 extern OCTINTERP_API int mexIsGlobal (const mxArray *ptr);
113 extern OCTINTERP_API int mexIsLocked (void);
114 
115 extern OCTINTERP_API int mexAtExit (void (*f) (void));
116 
117 /* Floating point predicates. */
118 extern OCTINTERP_API bool mxIsFinite (double v);
119 extern OCTINTERP_API bool mxIsInf (double v);
120 extern OCTINTERP_API bool mxIsNaN (double v);
121 
122 /* Floating point values. */
123 extern OCTINTERP_API double mxGetEps (void);
124 extern OCTINTERP_API double mxGetInf (void);
125 extern OCTINTERP_API double mxGetNaN (void);
126 
127 /* Memory management. */
128 extern OCTINTERP_API void * mxCalloc (size_t n, size_t size);
129 extern OCTINTERP_API void * mxMalloc (size_t n);
130 extern OCTINTERP_API void * mxRealloc (void *ptr, size_t size);
131 extern OCTINTERP_API void mxFree (void *ptr);
132 
133 /* Constructors. */
134 extern OCTINTERP_API mxArray * mxCreateCellArray (mwSize ndims,
135  const mwSize *dims);
136 extern OCTINTERP_API mxArray * mxCreateCellMatrix (mwSize m, mwSize n);
137 extern OCTINTERP_API mxArray * mxCreateCharArray (mwSize ndims,
138  const mwSize *dims);
139 extern OCTINTERP_API mxArray * mxCreateCharMatrixFromStrings (mwSize m,
140  const char **str);
141 extern OCTINTERP_API mxArray * mxCreateDoubleMatrix (mwSize nr, mwSize nc,
142  mxComplexity flag);
143 extern OCTINTERP_API mxArray * mxCreateDoubleScalar (double val);
144 extern OCTINTERP_API mxArray * mxCreateLogicalArray (mwSize ndims,
145  const mwSize *dims);
146 extern OCTINTERP_API mxArray * mxCreateLogicalMatrix (mwSize m, mwSize n);
147 extern OCTINTERP_API mxArray * mxCreateLogicalScalar (mxLogical val);
148 extern OCTINTERP_API mxArray * mxCreateNumericArray (mwSize ndims,
149  const mwSize *dims,
150  mxClassID class_id,
151  mxComplexity flag);
152 extern OCTINTERP_API mxArray * mxCreateNumericMatrix (mwSize m, mwSize n,
153  mxClassID class_id,
154  mxComplexity flag);
155 extern OCTINTERP_API mxArray * mxCreateUninitNumericArray (mwSize ndims,
156  const mwSize *dims,
157  mxClassID class_id,
158  mxComplexity flag);
159 extern OCTINTERP_API mxArray * mxCreateUninitNumericMatrix (mwSize m, mwSize n,
160  mxClassID class_id,
161  mxComplexity flag);
162 
163 extern OCTINTERP_API mxArray * mxCreateSparse (mwSize m, mwSize n, mwSize nzmax,
164  mxComplexity flag);
165 extern OCTINTERP_API mxArray * mxCreateSparseLogicalMatrix (mwSize m, mwSize n,
166  mwSize nzmax);
167 extern OCTINTERP_API mxArray * mxCreateString (const char *str);
168 extern OCTINTERP_API mxArray * mxCreateStructArray (mwSize ndims,
169  const mwSize *dims,
170  int num_keys,
171  const char **keys);
172 extern OCTINTERP_API mxArray * mxCreateStructMatrix (mwSize rows, mwSize cols,
173  int num_keys,
174  const char **keys);
175 
176 /* Copy constructor. */
177 extern OCTINTERP_API mxArray * mxDuplicateArray (const mxArray *v);
178 
179 /* Destructor. */
180 extern OCTINTERP_API void mxDestroyArray (mxArray *v);
181 
182 /* Type Predicates. */
183 extern OCTINTERP_API bool mxIsCell (const mxArray *ptr);
184 extern OCTINTERP_API bool mxIsChar (const mxArray *ptr);
185 extern OCTINTERP_API bool mxIsClass (const mxArray *ptr, const char *name);
186 extern OCTINTERP_API bool mxIsComplex (const mxArray *ptr);
187 extern OCTINTERP_API bool mxIsDouble (const mxArray *ptr);
188 /* Matlab seems to have deprecated IsFunctionHandle, but it seems useful */
189 extern OCTINTERP_API bool mxIsFunctionHandle (const mxArray *ptr);
190 extern OCTINTERP_API bool mxIsInt16 (const mxArray *ptr);
191 extern OCTINTERP_API bool mxIsInt32 (const mxArray *ptr);
192 extern OCTINTERP_API bool mxIsInt64 (const mxArray *ptr);
193 extern OCTINTERP_API bool mxIsInt8 (const mxArray *ptr);
194 extern OCTINTERP_API bool mxIsLogical (const mxArray *ptr);
195 extern OCTINTERP_API bool mxIsNumeric (const mxArray *ptr);
196 extern OCTINTERP_API bool mxIsSingle (const mxArray *ptr);
197 extern OCTINTERP_API bool mxIsSparse (const mxArray *ptr);
198 extern OCTINTERP_API bool mxIsStruct (const mxArray *ptr);
199 extern OCTINTERP_API bool mxIsUint16 (const mxArray *ptr);
200 extern OCTINTERP_API bool mxIsUint32 (const mxArray *ptr);
201 extern OCTINTERP_API bool mxIsUint64 (const mxArray *ptr);
202 extern OCTINTERP_API bool mxIsUint8 (const mxArray *ptr);
203 
204 /* Odd type+size predicate. */
205 extern OCTINTERP_API bool mxIsLogicalScalar (const mxArray *ptr);
206 
207 /* Odd type+size+value predicate. */
208 extern OCTINTERP_API bool mxIsLogicalScalarTrue (const mxArray *ptr);
209 
210 /* Size predicates. */
211 extern OCTINTERP_API bool mxIsEmpty (const mxArray *ptr);
212 extern OCTINTERP_API bool mxIsScalar (const mxArray *ptr);
213 
214 /* Just plain odd thing to ask of a value. */
215 extern OCTINTERP_API bool mxIsFromGlobalWS (const mxArray *ptr);
216 
217 /* Dimension extractors. */
218 extern OCTINTERP_API size_t mxGetM (const mxArray *ptr);
219 extern OCTINTERP_API size_t mxGetN (const mxArray *ptr);
220 extern OCTINTERP_API const mwSize * mxGetDimensions (const mxArray *ptr);
221 extern OCTINTERP_API mwSize mxGetNumberOfDimensions (const mxArray *ptr);
222 extern OCTINTERP_API size_t mxGetNumberOfElements (const mxArray *ptr);
223 
224 /* Dimension setters. */
225 extern OCTINTERP_API void mxSetM (mxArray *ptr, mwSize M);
226 extern OCTINTERP_API void mxSetN (mxArray *ptr, mwSize N);
227 extern OCTINTERP_API int mxSetDimensions (mxArray *ptr, const mwSize *dims,
228  mwSize ndims);
229 
230 /* Data extractors. */
231 extern OCTINTERP_API double * mxGetPi (const mxArray *ptr);
232 extern OCTINTERP_API double * mxGetPr (const mxArray *ptr);
233 extern OCTINTERP_API double mxGetScalar (const mxArray *ptr);
234 extern OCTINTERP_API mxChar * mxGetChars (const mxArray *ptr);
235 extern OCTINTERP_API mxLogical * mxGetLogicals (const mxArray *ptr);
236 extern OCTINTERP_API void * mxGetData (const mxArray *ptr);
237 extern OCTINTERP_API void * mxGetImagData (const mxArray *ptr);
238 
239 /* Data setters. */
240 extern OCTINTERP_API void mxSetPr (mxArray *ptr, double *pr);
241 extern OCTINTERP_API void mxSetPi (mxArray *ptr, double *pi);
242 extern OCTINTERP_API void mxSetData (mxArray *ptr, void *data);
243 extern OCTINTERP_API void mxSetImagData (mxArray *ptr, void *pi);
244 
245 /* Classes. */
246 extern OCTINTERP_API mxClassID mxGetClassID (const mxArray *ptr);
247 extern OCTINTERP_API const char * mxGetClassName (const mxArray *ptr);
248 extern OCTINTERP_API void mxSetClassName (mxArray *ptr, const char *name);
249 extern OCTINTERP_API mxArray * mxGetProperty (const mxArray *ptr, mwIndex idx,
250  const char *property_name);
251 extern OCTINTERP_API void mxSetProperty (mxArray *ptr, mwIndex idx,
252  const char *property_name,
253  const mxArray *property_value);
254 
255 /* Cell support. */
256 extern OCTINTERP_API mxArray * mxGetCell (const mxArray *ptr, mwIndex idx);
257 
258 extern OCTINTERP_API void mxSetCell (mxArray *ptr, mwIndex idx, mxArray *val);
259 
260 /* Sparse support. */
261 extern OCTINTERP_API mwIndex * mxGetIr (const mxArray *ptr);
262 extern OCTINTERP_API mwIndex * mxGetJc (const mxArray *ptr);
263 extern OCTINTERP_API mwSize mxGetNzmax (const mxArray *ptr);
264 
265 extern OCTINTERP_API void mxSetIr (mxArray *ptr, mwIndex *ir);
266 extern OCTINTERP_API void mxSetJc (mxArray *ptr, mwIndex *jc);
267 extern OCTINTERP_API void mxSetNzmax (mxArray *ptr, mwSize nzmax);
268 
269 /* Structure support. */
270 extern OCTINTERP_API int mxAddField (mxArray *ptr, const char *key);
271 
272 extern OCTINTERP_API void mxRemoveField (mxArray *ptr, int key_num);
273 
274 extern OCTINTERP_API mxArray * mxGetField (const mxArray *ptr, mwIndex index,
275  const char *key);
276 extern OCTINTERP_API mxArray * mxGetFieldByNumber (const mxArray *ptr,
277  mwIndex index, int key_num);
278 
279 extern OCTINTERP_API void mxSetField (mxArray *ptr, mwIndex index,
280  const char *key, mxArray *val);
281 extern OCTINTERP_API void mxSetFieldByNumber (mxArray *ptr, mwIndex index,
282  int key_num, mxArray *val);
283 
284 extern OCTINTERP_API int mxGetNumberOfFields (const mxArray *ptr);
285 
286 extern OCTINTERP_API const char * mxGetFieldNameByNumber (const mxArray *ptr,
287  int key_num);
288 extern OCTINTERP_API int mxGetFieldNumber (const mxArray *ptr, const char *key);
289 
290 extern OCTINTERP_API int mxGetString (const mxArray *ptr, char *buf,
291  mwSize buflen);
292 extern OCTINTERP_API char * mxArrayToString (const mxArray *ptr);
293 
294 /* Miscellaneous. */
295 extern OCTINTERP_API mwIndex mxCalcSingleSubscript (const mxArray *ptr,
296  mwSize nsubs,
297  mwIndex *subs);
298 
299 extern OCTINTERP_API size_t mxGetElementSize (const mxArray *ptr);
300 
301 #if defined (MEX_DEBUG)
302 
303 # define mxAssert(expr, msg) \
304  do \
305  { \
306  if (! (expr)) \
307  { \
308  if (msg && msg[0]) \
309  mexErrMsgIdAndTxt \
310  ("Octave:MEX", \
311  "Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
312  #expr, __LINE__, __FILE__, msg); \
313  else \
314  mexErrMsgIdAndTxt \
315  ("Octave:MEX", \
316  "Assertion failed: %s, at line %d of file \"%s\".\n", \
317  #expr, __LINE__, __FILE__); \
318  } \
319  } \
320  while (0)
321 
322 # define mxAssertS(expr, msg) \
323  do \
324  { \
325  if (! (expr)) \
326  { \
327  if (msg && msg[0]) \
328  mexErrMsgIdAndTxt \
329  ("Octave:MEX", \
330  "Assertion failed at line %d of file \"%s\".\n%s\n", \
331  __LINE__, __FILE__, msg); \
332  else \
333  mexErrMsgIdAndTxt \
334  ("Octave:MEX", \
335  "Assertion failed at line %d of file \"%s\".\n", \
336  __LINE__, __FILE__); \
337  } \
338  } \
339  while (0)
340 
341 #else
342 # define mxAssert(expr, msg)
343 # define mxAssertS(expr, msg)
344 #endif
345 
346 #if defined (__cplusplus)
347 }
348 #endif
349 
350 #endif
QString name
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_INT & N
F77_RET_T const F77_DBLE const F77_DBLE * f
OCTINTERP_API double mxGetNaN(void)
Definition: mex.cc:2541
OCTINTERP_API bool mxIsStruct(const mxArray *ptr)
Definition: mex.cc:2796
OCTINTERP_API bool mxIsScalar(const mxArray *ptr)
Definition: mex.cc:2847
OCTINTERP_API mwSize mxGetNumberOfDimensions(const mxArray *ptr)
Definition: mex.cc:2882
OCTINTERP_API mxArray * mexEvalStringWithTrap(const char *s)
Definition: mex.cc:3371
OCTINTERP_API double mxGetScalar(const mxArray *ptr)
Definition: mex.cc:2928
OCTINTERP_API int mxGetNumberOfFields(const mxArray *ptr)
Definition: mex.cc:3107
OCTINTERP_API double * mxGetPr(const mxArray *ptr)
Definition: mex.cc:2916
OCTINTERP_API mxArray * mxCreateStructMatrix(mwSize rows, mwSize cols, int num_keys, const char **keys)
Definition: mex.cc:2690
OCTINTERP_API mxLogical * mxGetLogicals(const mxArray *ptr)
Definition: mex.cc:2943
OCTINTERP_API void * mxMalloc(size_t n)
Definition: mex.cc:2554
OCTINTERP_API bool mxIsSparse(const mxArray *ptr)
Definition: mex.cc:2790
OCTINTERP_API const mxArray * mexGetVariablePtr(const char *space, const char *name)
Definition: mex.cc:3558
OCTINTERP_API bool mxIsLogicalScalarTrue(const mxArray *ptr)
Definition: mex.cc:2834
OCTINTERP_API void mxSetData(mxArray *ptr, void *data)
Definition: mex.cc:2974
OCTINTERP_API mxArray * mxGetFieldByNumber(const mxArray *ptr, mwIndex index, int key_num)
Definition: mex.cc:3088
OCTINTERP_API bool mxIsUint16(const mxArray *ptr)
Definition: mex.cc:2802
OCTINTERP_API size_t mxGetElementSize(const mxArray *ptr)
Definition: mex.cc:3143
OCTINTERP_API size_t mxGetNumberOfElements(const mxArray *ptr)
Definition: mex.cc:2888
OCTINTERP_API mxArray * mxCreateSparse(mwSize m, mwSize n, mwSize nzmax, mxComplexity flag)
Definition: mex.cc:2665
OCTINTERP_API mxArray * mexGetVariable(const char *space, const char *name)
Definition: mex.cc:3507
OCTINTERP_API void mxSetNzmax(mxArray *ptr, mwSize nzmax)
Definition: mex.cc:3062
OCTINTERP_API mxArray * mxCreateUninitNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:2651
OCTINTERP_API mwIndex * mxGetJc(const mxArray *ptr)
Definition: mex.cc:3038
OCTINTERP_API bool mxIsComplex(const mxArray *ptr)
Definition: mex.cc:2730
OCTINTERP_API bool mxIsLogicalScalar(const mxArray *ptr)
Definition: mex.cc:2827
OCTINTERP_API bool mxIsInf(double v)
Definition: mex.cc:2517
OCTINTERP_API mxArray * mxDuplicateArray(const mxArray *v)
Definition: mex.cc:2697
OCTINTERP_API mwSize mxGetNzmax(const mxArray *ptr)
Definition: mex.cc:3044
OCTINTERP_API const char * mxGetClassName(const mxArray *ptr)
Definition: mex.cc:2993
OCTINTERP_API mwIndex * mxGetIr(const mxArray *ptr)
Definition: mex.cc:3032
OCTINTERP_API void mexWarnMsgTxt(const char *s)
Definition: mex.cc:3454
OCTINTERP_API bool mxIsUint64(const mxArray *ptr)
Definition: mex.cc:2814
OCTINTERP_API mwIndex mxCalcSingleSubscript(const mxArray *ptr, mwSize nsubs, mwIndex *subs)
Definition: mex.cc:3137
OCTINTERP_API bool mxIsClass(const mxArray *ptr, const char *name)
Definition: mex.cc:2724
OCTINTERP_API int mexPrintf(const char *fmt,...)
Definition: mex.cc:3496
OCTINTERP_API mxArray * mxCreateStructArray(mwSize ndims, const mwSize *dims, int num_keys, const char **keys)
Definition: mex.cc:2683
OCTINTERP_API void mexSetTrapFlag(int flag)
Definition: mex.cc:3335
OCTINTERP_API mxArray * mxCreateCellArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:2583
OCTINTERP_API int mexIsLocked(void)
Definition: mex.cc:3662
OCTINTERP_API mxArray * mxCreateNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:2637
OCTINTERP_API mxArray * mxCreateLogicalArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:2619
OCTINTERP_API mxArray * mxCreateDoubleMatrix(mwSize nr, mwSize nc, mxComplexity flag)
Definition: mex.cc:2607
OCTINTERP_API double * mxGetPi(const mxArray *ptr)
Definition: mex.cc:2922
OCTINTERP_API mxArray * mxCreateSparseLogicalMatrix(mwSize m, mwSize n, mwSize nzmax)
Definition: mex.cc:2671
OCTINTERP_API mxArray * mxCreateDoubleScalar(double val)
Definition: mex.cc:2613
OCTINTERP_API bool mxIsInt16(const mxArray *ptr)
Definition: mex.cc:2748
OCTINTERP_API bool mxIsDouble(const mxArray *ptr)
Definition: mex.cc:2736
OCTINTERP_API void mxDestroyArray(mxArray *v)
Definition: mex.cc:2704
OCTINTERP_API void mxSetFieldByNumber(mxArray *ptr, mwIndex index, int key_num, mxArray *val)
Definition: mex.cc:3101
OCTINTERP_API double mxGetInf(void)
Definition: mex.cc:2535
OCTINTERP_API mxArray * mxCreateUninitNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:2658
OCTINTERP_API bool mxIsEmpty(const mxArray *ptr)
Definition: mex.cc:2841
OCTINTERP_API mxArray * mxGetCell(const mxArray *ptr, mwIndex idx)
Definition: mex.cc:3019
OCTINTERP_API void mxSetField(mxArray *ptr, mwIndex index, const char *key, mxArray *val)
Definition: mex.cc:3094
OCTINTERP_API bool mxIsFinite(double v)
Definition: mex.cc:2511
OCTINTERP_API void * mxCalloc(size_t n, size_t size)
Definition: mex.cc:2548
OCTINTERP_API mxArray * mxCreateString(const char *str)
Definition: mex.cc:2677
OCTINTERP_API mxArray * mxGetField(const mxArray *ptr, mwIndex index, const char *key)
Definition: mex.cc:3081
OCTINTERP_API bool mxIsNaN(double v)
Definition: mex.cc:2523
OCTINTERP_API bool mxIsInt8(const mxArray *ptr)
Definition: mex.cc:2766
OCTINTERP_API void mxFree(void *ptr)
Definition: mex.cc:2567
OCTINTERP_API int mexPutVariable(const char *space, const char *name, const mxArray *ptr)
Definition: mex.cc:3564
OCTINTERP_API char * mxArrayToString(const mxArray *ptr)
Definition: mex.cc:3131
OCTINTERP_API mxArray * mexCallMATLABWithTrap(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
Definition: mex.cc:3311
OCTINTERP_API size_t mxGetN(const mxArray *ptr)
Definition: mex.cc:2870
OCTINTERP_API void mxSetPr(mxArray *ptr, double *pr)
Definition: mex.cc:2962
OCTINTERP_API mxArray * mxCreateLogicalScalar(mxLogical val)
Definition: mex.cc:2631
OCTINTERP_API double mxGetEps(void)
Definition: mex.cc:2529
OCTINTERP_API void mxSetImagData(mxArray *ptr, void *pi)
Definition: mex.cc:2980
OCTINTERP_API mxArray * mxCreateCharMatrixFromStrings(mwSize m, const char **str)
Definition: mex.cc:2601
OCTINTERP_API mxArray * mxCreateNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
Definition: mex.cc:2644
OCTINTERP_API int mexEvalString(const char *s)
Definition: mex.cc:3342
OCTINTERP_API mxArray * mxGetProperty(const mxArray *ptr, mwIndex idx, const char *property_name)
Definition: mex.cc:3012
OCTINTERP_API mxChar * mxGetChars(const mxArray *ptr)
Definition: mex.cc:2934
OCTINTERP_API void * mxGetData(const mxArray *ptr)
Definition: mex.cc:2949
OCTINTERP_API void mexWarnMsgIdAndTxt(const char *id, const char *s,...)
Definition: mex.cc:3477
OCTINTERP_API mxClassID mxGetClassID(const mxArray *ptr)
Definition: mex.cc:2987
OCTINTERP_API void mexMakeMemoryPersistent(void *ptr)
Definition: mex.cc:3622
OCTINTERP_API void mxSetIr(mxArray *ptr, mwIndex *ir)
Definition: mex.cc:3050
OCTINTERP_API void mexErrMsgIdAndTxt(const char *id, const char *s,...)
Definition: mex.cc:3432
OCTINTERP_API int mxSetDimensions(mxArray *ptr, const mwSize *dims, mwSize ndims)
Definition: mex.cc:2907
OCTINTERP_API int mexSet(double handle, const char *property, mxArray *val)
Definition: mex.cc:3699
OCTINTERP_API bool mxIsCell(const mxArray *ptr)
Definition: mex.cc:2712
OCTINTERP_API void mxRemoveField(mxArray *ptr, int key_num)
Definition: mex.cc:3075
OCTINTERP_API void mexMakeArrayPersistent(mxArray *ptr)
Definition: mex.cc:3616
OCTINTERP_API size_t mxGetM(const mxArray *ptr)
Definition: mex.cc:2864
OCTINTERP_API void mexUnlock(void)
Definition: mex.cc:3708
OCTINTERP_API void * mxRealloc(void *ptr, size_t size)
Definition: mex.cc:2560
OCTINTERP_API int mexIsGlobal(const mxArray *ptr)
Definition: mex.cc:3656
OCTINTERP_API mxArray * mxCreateCellMatrix(mwSize m, mwSize n)
Definition: mex.cc:2589
OCTINTERP_API mxArray * mxCreateCharArray(mwSize ndims, const mwSize *dims)
Definition: mex.cc:2595
OCTINTERP_API void mxSetPi(mxArray *ptr, double *pi)
Definition: mex.cc:2968
OCTINTERP_API void mexErrMsgTxt(const char *s)
Definition: mex.cc:3409
OCTINTERP_API int mexCallMATLAB(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
Definition: mex.cc:3232
OCTINTERP_API bool mxIsUint8(const mxArray *ptr)
Definition: mex.cc:2820
OCTINTERP_API bool mxIsUint32(const mxArray *ptr)
Definition: mex.cc:2808
OCTINTERP_API const mxArray * mexGet(double handle, const char *property)
Definition: mex.cc:3643
OCTINTERP_API const mwSize * mxGetDimensions(const mxArray *ptr)
Definition: mex.cc:2876
OCTINTERP_API bool mxIsFromGlobalWS(const mxArray *ptr)
Definition: mex.cc:2855
OCTINTERP_API void mxSetClassName(mxArray *ptr, const char *name)
Definition: mex.cc:2999
OCTINTERP_API const char * mexFunctionName(void)
Definition: mex.cc:3226
OCTINTERP_API int mexAtExit(void(*f)(void))
Definition: mex.cc:3628
OCTINTERP_API bool mxIsNumeric(const mxArray *ptr)
Definition: mex.cc:2778
OCTINTERP_API const char * mxGetFieldNameByNumber(const mxArray *ptr, int key_num)
Definition: mex.cc:3113
OCTINTERP_API bool mxIsFunctionHandle(const mxArray *ptr)
Definition: mex.cc:2742
OCTINTERP_API void * mxGetImagData(const mxArray *ptr)
Definition: mex.cc:2955
OCTINTERP_API int mxGetString(const mxArray *ptr, char *buf, mwSize buflen)
Definition: mex.cc:3125
OCTINTERP_API int mxAddField(mxArray *ptr, const char *key)
Definition: mex.cc:3069
OCTINTERP_API void mxSetN(mxArray *ptr, mwSize N)
Definition: mex.cc:2901
OCTINTERP_API void mxSetM(mxArray *ptr, mwSize M)
Definition: mex.cc:2895
OCTINTERP_API bool mxIsLogical(const mxArray *ptr)
Definition: mex.cc:2772
OCTINTERP_API bool mxIsSingle(const mxArray *ptr)
Definition: mex.cc:2784
OCTINTERP_API void mxSetCell(mxArray *ptr, mwIndex idx, mxArray *val)
Definition: mex.cc:3025
OCTINTERP_API bool mxIsInt32(const mxArray *ptr)
Definition: mex.cc:2754
OCTINTERP_API int mxGetFieldNumber(const mxArray *ptr, const char *key)
Definition: mex.cc:3119
OCTINTERP_API void mexLock(void)
Definition: mex.cc:3681
OCTINTERP_API bool mxIsChar(const mxArray *ptr)
Definition: mex.cc:2718
OCTINTERP_API void mxSetJc(mxArray *ptr, mwIndex *jc)
Definition: mex.cc:3056
OCTINTERP_API bool mxIsInt64(const mxArray *ptr)
Definition: mex.cc:2760
OCTINTERP_API mxArray * mxCreateLogicalMatrix(mwSize m, mwSize n)
Definition: mex.cc:2625
OCTINTERP_API void mxSetProperty(mxArray *ptr, mwIndex idx, const char *property_name, const mxArray *property_value)
Definition: mex.cc:3005
T octave_idx_type m
Definition: mx-inlines.cc:773
octave_idx_type n
Definition: mx-inlines.cc:753
char mxChar
Definition: mxarray.in.h:87
OCTAVE_IDX_TYPE mwSize
Definition: mxarray.in.h:97
mxClassID
Definition: mxarray.in.h:57
OCTAVE_IDX_TYPE mwIndex
Definition: mxarray.in.h:98
mxComplexity
Definition: mxarray.in.h:79
unsigned char mxLogical
Definition: mxarray.in.h:89
static const double pi
Definition: lo-specfun.cc:1995