📄 matrix.h
字号:
/*
* @(#)matrix.h generated by: makeheader 4.21 Tue Jul 26 18:26:13 2005
*
* built from: ../../src/include/copyright.h
* ../../src/include/pragma_interface.h
* ./alloccbk.cpp
* ./alloclst.cpp
* ./array.cpp
* ./array2.cpp
* ./arraycbk.cpp
* ./arraycpy.cpp
* ./assignmt.cpp
* ./bytestr.cpp
* ./catenate.cpp
* ./cellindex.cpp
* ./checkdim.cpp
* ./conversions.cpp
* ./end.cpp
* ./errmsg.cpp
* ./error.cpp
* ./fmxapi.cpp
* ./fmxapiv5.cpp
* ./funhdl.cpp
* ./ieee_wrap.cpp
* ./indexcpy.cpp
* ./iocbk.cpp
* ./marshal.cpp
* ./mcat.cpp
* ./mxapiv4.cpp
* ./mxapiv5.cpp
* ./mxassert.cpp
* ./mxequal.cpp
* ./mxutil.cpp
* ./nameindex.cpp
* ./nargchk.cpp
* ./numconv.cpp
* ./opaque.cpp
* ./permute.cpp
* ./populate.cpp
* ./referenc.cpp
* ./resize.cpp
* ./rndcolon.cpp
* ./scopemgr.cpp
* ./spassex.cpp
* ./sprefex.cpp
* ./strconv.cpp
* ./subserror.cpp
* ./transpose.cpp
* ./txtcmp.cpp
* ./undoc.cpp
* ./warning.cpp
* ./zbuffer.cpp
* mxdbg.h
*/
#ifndef matrix_h
#define matrix_h
/*
* Copyright 1984-2003 The MathWorks, Inc.
* All Rights Reserved.
*/
/* Copyright 2003-2004 The MathWorks, Inc. */
/*
* Prevent g++ from making copies of vtable and typeinfo data
* in every compilation unit. By allowing for only one, we can
* save space and prevent some situations where the linker fails
* to coalesce them properly into a single entry.
*
* References:
* http://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html#Vague%20Linkage
* http://gcc.gnu.org/onlinedocs/gcc/C---Interface.html
*/
#ifdef __cplusplus
# ifdef __linux__
# pragma interface
# endif
#endif
#include <stddef.h> /* size_t */
#ifdef __cplusplus
extern "C" {
#endif
/*
* allocate memory, notifying registered listener
*/
extern void *mxMalloc(
size_t n /* number of bytes */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* allocate cleared memory, notifying registered listener.
*/
extern void *mxCalloc(
size_t n, /* number of objects */
size_t size /* size of objects */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* free memory, notifying registered listener.
*/
extern void mxFree(void *ptr); /* pointer to memory to be freed */
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* reallocate memory, notifying registered listener.
*/
extern void *mxRealloc(void *ptr, size_t size);
#ifdef __cplusplus
}
#endif
#if !defined(mxArray_DEFINED)
/*
* Incomplete definition of mxArray
*/
typedef struct mxArray_tag mxArray;
#define mxArray_DEFINED
#endif /* !defined(mxArray_DEFINED) */
#include "tmwtypes.h"
typedef void(*mxFunctionPtr)(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);
#define mxMAXNAM TMW_NAME_LENGTH_MAX /* maximum name length */
#if !defined(__APPLE__)
typedef bool mxLogical;
#else
typedef unsigned char mxLogical;
#endif
#ifdef __ENABLE_UNICODE_DATA_REPRESENTATION__
/* Default is UTF-16 when Unicode rep is enabled. */
typedef char16_t mxChar;
#else
/* Default is schizophrenic rep when Unicode is NOT enabled. */
typedef uint16_T mxChar;
#endif
/*
* Flipped the position of mxLOGICAL_CLASS and mxOBJECT_CLASS
* to make sure that mxOBJECT_CLASS is last in the list.
*/
typedef enum {
mxUNKNOWN_CLASS = 0,
mxCELL_CLASS,
mxSTRUCT_CLASS,
mxLOGICAL_CLASS,
mxCHAR_CLASS,
mxVOID_CLASS,
mxDOUBLE_CLASS,
mxSINGLE_CLASS,
mxINT8_CLASS,
mxUINT8_CLASS,
mxINT16_CLASS,
mxUINT16_CLASS,
mxINT32_CLASS,
mxUINT32_CLASS,
mxINT64_CLASS,
mxUINT64_CLASS,
mxFUNCTION_CLASS,
mxOPAQUE_CLASS,
mxOBJECT_CLASS
} mxClassID;
/* VERY TEMPORARY AND NASTY HACK TILL mxSPARSE_CLASS IS COMPLETELY ELIMINATED */
#define mxSPARSE_CLASS mxVOID_CLASS /* OBSOLETE! DO NOT USE */
typedef enum {
mxREAL,
mxCOMPLEX
} mxComplexity;
#if defined(ARRAY_ACCESS_INLINING) && !defined(MATLAB_COMPILER_GENERATED_CODE)
/*
* This modified version of the mxArray structure is needed to support
* the ARRAY_ACCESS_INLINING macros. NOTE: The elements in this structure
* should not be accessed directly. Inlined MEX-files are NOT guaranteed
* to be portable from one release of MATLAB to another.
*/
struct mxArray_tag {
void *reserved;
int reserved1[2];
void *reserved2;
int number_of_dims;
unsigned int reserved3;
struct {
unsigned int scalar_flag : 1;
unsigned int flag1 : 1;
unsigned int flag2 : 1;
unsigned int flag3 : 1;
unsigned int flag4 : 1;
unsigned int flag5 : 1;
unsigned int flag6 : 1;
unsigned int flag7 : 1;
unsigned int private_data_flag : 1;
unsigned int flag8 : 1;
unsigned int flag9 : 1;
unsigned int flag10 : 1;
unsigned int flag11 : 4;
unsigned int flag12 : 8;
unsigned int flag13 : 8;
} flags;
unsigned int reserved4[2];
union {
struct {
void *pdata;
void *pimag_data;
void *reserved5;
int reserved6[3];
} number_array;
} data;
};
#endif /* ARRAY_ACCESS_INLINING */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Return the class (catergory) of data that the array holds.
*/
extern mxClassID mxGetClassID(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get pointer to data
*/
extern void *mxGetData(
const mxArray *pa /* pointer to array */
);
#ifdef __cplusplus
}
#endif
#if defined(ARRAY_ACCESS_INLINING)
#define mxGetData(pa) ((pa)->data.number_array.pdata)
#endif /* defined(ARRAY_ACCESS_INLINING) */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Set pointer to data
*/
extern void mxSetData(
mxArray *pa, /* pointer to array */
void *newdata /* pointer to data */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array contains numeric (as opposed
* to cell or struct) data.
*/
extern bool mxIsNumeric(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array is a cell array.
*/
extern bool mxIsCell(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array's logical flag is on.
*/
extern bool mxIsLogical(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array contains character data.
*/
extern bool mxIsChar(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array is a structure array.
*/
extern bool mxIsStruct(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array is an opaque array.
*/
extern bool mxIsOpaque(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Returns true if specified array is a function object.
*/
extern bool mxIsFunctionHandle(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Is array user defined object
*/
extern bool mxIsObject(
const mxArray *pa /* pointer to array */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get imaginary data pointer for numeric array
*/
extern void *mxGetImagData(
const mxArray *pa /* pointer to array */
);
#ifdef __cplusplus
}
#endif
#if defined(ARRAY_ACCESS_INLINING)
#define mxGetImagData(pa) ((pa)->data.number_array.pimag_data)
#endif /* defined(ARRAY_ACCESS_INLINING) */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Set imaginary data pointer for numeric array
*/
extern void mxSetImagData(
mxArray *pa, /* pointer to array */
void *newdata /* imaginary data array pointer */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array contains complex data.
*/
extern bool mxIsComplex(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the given array is a sparse (as opposed to full).
*/
extern bool mxIsSparse(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* double-precision floating-point numbers.
*/
extern bool mxIsDouble(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* single-precision floating-point numbers.
*/
extern bool mxIsSingle(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* signed 8-bit integers.
*/
extern bool mxIsInt8(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* unsigned 8-bit integers.
*/
extern bool mxIsUint8(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* signed 16-bit integers.
*/
extern bool mxIsInt16(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* unsigned 16-bit integers.
*/
extern bool mxIsUint16(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* signed 32-bit integers.
*/
extern bool mxIsInt32(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* unsigned 32-bit integers.
*/
extern bool mxIsUint32(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* signed 64-bit integers.
*/
extern bool mxIsInt64(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Determine whether the specified array represents its data as
* unsigned 64-bit integers.
*/
extern bool mxIsUint64(const mxArray *pa);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get number of dimensions in array
*/
extern int mxGetNumberOfDimensions(
const mxArray *pa /* pointer to array */
);
#ifdef __cplusplus
}
#endif
#if defined(ARRAY_ACCESS_INLINING)
#define mxGetNumberOfDimensions(pa) ((pa)->number_of_dims)
#endif /* defined(ARRAY_ACCESS_INLINING) */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get pointer to dimension array
*/
extern const int *mxGetDimensions(
const mxArray *pa /* pointer to array */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get number of elements in array
*/
extern int mxGetNumberOfElements(
const mxArray *pa /* pointer to array */
);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Get real data pointer for numeric array
*/
extern double *mxGetPr(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -