home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#)matrix16.h generated by: makeheader Thu Mar 18 19:30:36 1993
- *
- * built from: matdll.c
- */
-
- #ifndef matrix16_h
- #define matrix16_h
-
-
- /*
- * Enumerate matrix structures
- */
- typedef long mxMatrixStructures;
- #define mxFULL 0 /* full matrix */
- #define mxSPARSE 1 /* sparse matrix */
- #define mxCOLON 2 /* colon operator */
- #define mxGLOBAL 3 /* global (internal parse only) */
- #define mxUNASSIGNED 4 /* unassigned variable flag */
- #define mxCLEARMAT 5 /* cleared variable flag */
- #define mxUNASSARG 6 /* unassigned M-file arg */
- #define mxRHSUNASSIGNED 7 /* undefined symbol */
- #define mxASSIGNED 8 /* assigned variable flag */
- #define mxSPAM 9 /* spam format matrix */
-
- /*
- * Enumerate matrix types
- */
- typedef long mxMatrixTypes;
- #define mxDOUBLE 0 /* double precision */
- #define mxFLOAT 1 /* single precision */
- #define mxLONGINT 2 /* 32 bit signed int */
- #define mxSHORTINT 3 /* 16 bit signed int */
- #define mxUSHORTINT 4 /* 16 bit unsigned int */
- #define mxUCHAR 5 /* 8 bit unsigned char/int */
-
- /*
- * Enumerate display modes
- */
- typedef long mxDisplayModes;
- #define mxNUMBER 0 /* Display as a number */
- #define mxSTRING 1 /* Display as a string */
-
- /*
- * The Matrix typedef
- */
- #define mxMAXNAM 20 /* maximum name length */
- #define mxMAXTAG 4 /* maximum tag length */
- #define mxMAXDIM 2 /* maximum array dimension */
-
- struct matrix{
- char name[mxMAXNAM];
- long struc;
- long type;
- long dmode;
- char tag[mxMAXTAG];
- long dim[mxMAXDIM]; /* array of dimensions */
- double huge *pr; /* pointer to real part */
- double huge *pi; /* pointer to imag part */
- long nzmax; /* number of nonzero sparse entries */
- long huge *jc; /* sparse indices */
- long huge *ir; /* sparse indices */
- };
-
- typedef struct matrix Matrix;
-
-
-
- /*
- * Get pointer to matrix name.
- */
- extern char *mxGetName(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set matrix name. This routine copies the string pointed to by s
- * into the mxMAXNAM length character name field.
- */
- extern void mxSetName(
- Matrix *pm, /* pointer to matrix */
- const char *s /* string to copy into name */
- );
-
-
- /*
- * Get row dimension
- */
- extern long mxGetM(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set row dimension
- */
- extern void mxSetM(
- Matrix *pm, /* pointer to matrix */
- long m /* row dimension */
- );
-
-
- /*
- * Get column dimension
- */
- extern long mxGetN(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set column dimension
- */
- extern void mxSetN(
- Matrix *pm, /* pointer to matrix */
- long n /* column dimension */
- );
-
-
- /*
- * Get pointer to real part
- */
- extern double *mxGetPr(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set pointer to real part
- */
- extern void mxSetPr(
- Matrix *pm, /* pointer to matrix */
- double *pr /* pointer to real part */
- );
-
-
- /*
- * Get pointer to imag part
- */
- extern double *mxGetPi(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set pointer to imag part
- */
- extern void mxSetPi(
- Matrix *pm, /* pointer to matrix */
- double *pi /* pointer to imag part */
- );
-
-
- /*
- * Get number of nonzero elements of sparse matrix
- */
- extern long mxGetNzmax(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set number of nonzero elements of sparse matrix
- */
- extern void mxSetNzmax(
- Matrix *pm, /* pointer to matrix */
- long nzmax /* number of nonzero elements */
- );
-
-
- /*
- * Get pointer to sparse ir array
- */
- extern long *mxGetIr(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set pointer to sparse ir array
- */
- extern void mxSetIr(
- Matrix *pm, /* pointer to matrix */
- long *ir /* pointer to ir array */
- );
-
-
- /*
- * Get pointer to sparse jc array
- */
- extern long *mxGetJc(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Set pointer to sparse jc array
- */
- extern void mxSetJc(
- Matrix *pm, /* pointer to matrix */
- long *jc /* pointer to sparse jc array */
- );
-
-
- /*
- * Indicate if there is a complex part to the matrix
- */
- extern int mxIsComplex(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Indicate if matrix argument is of type real
- */
- extern int mxIsDouble(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Indicate if matrix argument is full
- */
- extern int mxIsFull(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Indicate if data is to be represented as a string
- */
- extern int mxIsNumeric(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Indicate if matrix argument is sparse
- */
- extern int mxIsSparse(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Return 1 if matrix contains a string, 0 otherwise
- */
- extern int mxIsString(
- const Matrix *pm /* pointer to matrix */
- );
-
-
- /*
- * Convert MATLAB string to C string
- */
- extern int mxGetString(
- Matrix *pm, /* pointer to matrix */
- char *str_ptr, /* pointer to string holding results */
- int str_len /* length of string that holds results */
- );
-
-
- /*
- * Return first value of double matrix
- */
- extern double mxGetScalar(
- Matrix *pm
- );
-
- #endif /* matrix16_h */
-