40
53
void sputil_error /* reports an error */
42
int error, /* kind of error */
43
int is_index /* TRUE if a matrix index, FALSE if a matrix dimension */
55
Int error, /* kind of error */
56
Int is_index /* TRUE if a matrix index, FALSE if a matrix dimension */
46
int sputil_double_to_int /* returns integer value of x */
59
Int sputil_double_to_int /* returns integer value of x */
48
61
double x, /* double value to convert */
49
int is_index, /* TRUE if a matrix index, FALSE if a matrix dimension */
50
int n /* if a matrix index, x cannot exceed this dimension */
62
Int is_index, /* TRUE if a matrix index, FALSE if a matrix dimension */
63
Int n /* if a matrix index, x cannot exceed this dimension */
53
66
double sputil_get_double (const mxArray *arg) ; /* like mxGetScalar */
55
int sputil_get_integer /* returns the integer value of a MATLAB argument */
68
Int sputil_get_integer /* returns the integer value of a MATLAB argument */
57
70
const mxArray *arg, /* MATLAB argument to convert */
58
int is_index, /* TRUE if an index, FALSE if a matrix dimension */
59
int n /* maximum value, if an index */
71
Int is_index, /* TRUE if an index, FALSE if a matrix dimension */
72
Int n /* maximum value, if an index */
63
int sputil_copy_ij /* returns the dimension, n */
76
Int sputil_copy_ij /* returns the dimension, n */
65
int is_scalar, /* TRUE if argument is a scalar, FALSE otherwise */
66
int scalar, /* scalar value of the argument */
78
Int is_scalar, /* TRUE if argument is a scalar, FALSE otherwise */
79
Int scalar, /* scalar value of the argument */
67
80
void *vector, /* vector value of the argument */
68
81
mxClassID category, /* type of vector */
69
int nz, /* length of output vector I */
70
int n, /* maximum dimension, EMPTY if not yet known */
71
int *I /* vector of length nz to copy into */
82
Int nz, /* length of output vector I */
83
Int n, /* maximum dimension, EMPTY if not yet known */
84
Int *I /* vector of length nz to copy into */
74
87
/* converts a triplet matrix to a compressed-column matrix */
75
88
cholmod_sparse *sputil_triplet_to_sparse
77
int nrow, int ncol, int nz, int nzmax,
78
int i_is_scalar, int i, void *i_vector, mxClassID i_class,
79
int j_is_scalar, int j, void *j_vector, mxClassID j_class,
80
int s_is_scalar, double x, double z, void *x_vector, double *z_vector,
81
mxClassID s_class, int s_complex,
90
Int nrow, Int ncol, Int nz, Int nzmax,
91
Int i_is_scalar, Int i, void *i_vector, mxClassID i_class,
92
Int j_is_scalar, Int j, void *j_vector, mxClassID j_class,
93
Int s_is_scalar, double x, double z, void *x_vector, double *z_vector,
94
mxClassID s_class, Int s_complex,
85
98
mxArray *sputil_copy_sparse (const mxArray *A) ; /* copy a sparse matrix */
87
int sputil_nelements (const mxArray *arg) ; /* like mxGetNumberOfElements */
100
Int sputil_nelements (const mxArray *arg) ; /* like mxGetNumberOfElements */
89
102
void sputil_sparse /* top-level wrapper for "sparse" function */