#include "mex.h"
#include <ctype.h>
Go to the source code of this file.
Data Structures | |
struct | _uMexOption |
MEX option. More... | |
Defines | |
#define | VL_USE_MATLAB_ENV |
Let VLFeat use MATLAB memory allocation/logging facilities. | |
Typedefs | |
typedef struct _uMexOption | uMexOption |
MEX opion type. | |
Functions | |
static mxArray * | uCreateNumericArray (mwSize ndim, const mwSize *dims, mxClassID classid, void *data) |
Create array with pre-allocated data. | |
static mxArray * | uCreateNumericMatrix (int M, int N, mxClassID classid, void *data) |
Create array with pre-allocated data. | |
static int | uIsScalar (const mxArray *A) |
Is the array a numeric scalar? | |
static int | uIsMatrix (const mxArray *A, int M, int N) |
Is the array a numeric matrix? | |
static int | uIsVector (const mxArray *A, int N) |
Is the array a vector? | |
static int | uIsReal (const mxArray *A) |
Is the array real? | |
static int | uIsRealScalar (const mxArray *A) |
Is the array real and scalar? | |
static int | uIsRealMatrix (const mxArray *A, int M, int N) |
Is the array a real matrix? | |
static int | uIsRealVector (const mxArray *A, int N) |
Is the array a real vector? | |
static int | uIsRealArray (const mxArray *A, int D, const int *dims) |
Is the array real with specified dimensions? | |
static int | uIsString (const mxArray *A, int L) |
Is the array a string? | |
static int | uStrICmp (const char *s1, const char *s2) |
Case insensitive string comparison. | |
static int | uNextOption (mxArray const *args[], int nargs, uMexOption const *options, int *next, mxArray const **optarg) |
Process next option. |
#define VL_USE_MATLAB_ENV |
Value:
vl_set_alloc_func (mxMalloc, mxRealloc, mxCalloc, mxFree) ; \ vl_set_printf_func (mexPrintf) ;
typedef struct _uMexOption uMexOption |
static mxArray* uCreateNumericArray | ( | mwSize | ndim, | |
const mwSize * | dims, | |||
mxClassID | classid, | |||
void * | data | |||
) | [static] |
ndim | number of dimensions. | |
dims | dimensions. | |
classid | storage class ID. | |
data | pre-allocated data. |
static mxArray* uCreateNumericMatrix | ( | int | M, | |
int | N, | |||
mxClassID | classid, | |||
void * | data | |||
) | [static] |
M | number of rows. | |
N | number of columns. | |
classid | class ID. | |
data | pre-allocated data. |
static int uIsMatrix | ( | const mxArray * | A, | |
int | M, | |||
int | N | |||
) | [static] |
A | array to test. | |
M | number of rows. | |
N | number of columns. |
static int uIsReal | ( | const mxArray * | A | ) | [static] |
A | array to test. |
static int uIsRealArray | ( | const mxArray * | A, | |
int | D, | |||
const int * | dims | |||
) | [static] |
A | array to check. | |
D | number of dimensions. | |
dims | dimensions. |
static int uIsRealMatrix | ( | const mxArray * | A, | |
int | M, | |||
int | N | |||
) | [static] |
A | array to test. | |
M | number of rows. | |
N | number of columns. |
static int uIsRealScalar | ( | const mxArray * | A | ) | [static] |
A | array to test. |
static int uIsRealVector | ( | const mxArray * | A, | |
int | N | |||
) | [static] |
A | array to test. | |
N | number of elements. |
N
< 0 or the other dimension is equal to N
.
static int uIsScalar | ( | const mxArray * | A | ) | [static] |
A | array to test. |
static int uIsString | ( | const mxArray * | A, | |
int | L | |||
) | [static] |
A | array to test. | |
L | string length. |
static int uIsVector | ( | const mxArray * | A, | |
int | N | |||
) | [static] |
A | array to test. | |
N | number of elements. |
N
< 0 or the other dimension is equal to N
.
static int uNextOption | ( | mxArray const * | args[], | |
int | nargs, | |||
uMexOption const * | options, | |||
int * | next, | |||
mxArray const ** | optarg | |||
) | [static] |
args | MEX argument array. | |
nargs | MEX argument array length. | |
options | List of option definitions. | |
next | Pointer to the next option (in and out). | |
optarg | Pointer to the option optional argument (out). |
This argument is suppsed to be the name of an option (case insensitive). The option is looked up in the option table options and decoded as the value uMexOption::val. Furthermore, if uMexOption::has_arg is true, the next entry in the array args is assumed to be argument of the option and stored in optarg. Finally, next is advanced to point to the next option.
static int uStrICmp | ( | const char * | s1, | |
const char * | s2 | |||
) | [static] |
s1 | fisrt string. | |
s2 | second string. |