return 0;
}
-
-/*-------------------------------------------------------------------------*/
-
-char *mm_typecode_to_str(MM_typecode matcode)
-{
- char buffer[MM_MAX_LINE_LENGTH];
- char *types[4];
- /* char *strdup(const char *); */
-
- /* check for MTX type */
- if (mm_is_matrix(matcode))
- types[0] = MM_MTX_STR;
- else
- return NULL;
-
- /* check for CRD or ARR matrix */
- if (mm_is_sparse(matcode))
- types[1] = MM_SPARSE_STR;
- else if (mm_is_dense(matcode))
- types[1] = MM_DENSE_STR;
- else
- return NULL;
-
- /* check for element data type */
- if (mm_is_real(matcode))
- types[2] = MM_REAL_STR;
- else if (mm_is_complex(matcode))
- types[2] = MM_COMPLEX_STR;
- else if (mm_is_pattern(matcode))
- types[2] = MM_PATTERN_STR;
- else if (mm_is_integer(matcode))
- types[2] = MM_INT_STR;
- else
- return NULL;
-
-
- /* check for symmetry type */
- if (mm_is_general(matcode))
- types[3] = MM_GENERAL_STR;
- else if (mm_is_symmetric(matcode))
- types[3] = MM_SYMM_STR;
- else if (mm_is_hermitian(matcode))
- types[3] = MM_HERM_STR;
- else if (mm_is_skew(matcode))
- types[3] = MM_SKEW_STR;
- else
- return NULL;
-
- snprintf(buffer, sizeof(buffer), "%s %s %s %s", types[0], types[1],
- types[2], types[3]);
- return strdup(buffer);
-
-}
typedef char MM_typecode[4];
-char *mm_typecode_to_str(MM_typecode matcode);
-
int mm_read_banner(FILE * f, MM_typecode * matcode);
int mm_read_mtx_crd_size(FILE * f, int *M, int *N, int *nz);