Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
mmio.h File Reference

Matrix Market I/O API More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MM_typecode
 

Macros

#define MM_MAX_LINE_LENGTH   100025
 
#define MatrixMarketBanner   "%%MatrixMarket"
 
#define MM_MAX_TOKEN_LENGTH   64
 
#define MM_COULD_NOT_READ_FILE   11
 
#define MM_PREMATURE_EOF   12
 
#define MM_NOT_MTX   13
 
#define MM_NO_HEADER   14
 
#define MM_UNSUPPORTED_TYPE   15
 
#define MM_LINE_TOO_LONG   16
 
#define MM_MTX_STR   "matrix"
 
#define MM_COORDINATE_STR   "coordinate"
 
#define MM_SPARSE_STR   "coordinate"
 
#define MM_COMPLEX_STR   "complex"
 
#define MM_REAL_STR   "real"
 
#define MM_INT_STR   "integer"
 
#define MM_GENERAL_STR   "general"
 
#define MM_SYMM_STR   "symmetric"
 
#define MM_HERM_STR   "hermitian"
 
#define MM_SKEW_STR   "skew-symmetric"
 
#define MM_PATTERN_STR   "pattern"
 

Enumerations

enum  matrix_shape_t { MS_GENERAL , MS_SYMMETRIC , MS_HERMITIAN , MS_SKEW }
 

Functions

int mm_read_banner (FILE *f, MM_typecode *matcode)
 
int mm_read_mtx_crd_size (FILE *f, int *M, int *N, int *nz)
 

Macro Definition Documentation

◆ MatrixMarketBanner

#define MatrixMarketBanner   "%%MatrixMarket"

Definition at line 26 of file mmio.h.

◆ MM_COMPLEX_STR

#define MM_COMPLEX_STR   "complex"

Definition at line 68 of file mmio.h.

◆ MM_COORDINATE_STR

#define MM_COORDINATE_STR   "coordinate"

Definition at line 66 of file mmio.h.

◆ MM_COULD_NOT_READ_FILE

#define MM_COULD_NOT_READ_FILE   11

Definition at line 42 of file mmio.h.

◆ MM_GENERAL_STR

#define MM_GENERAL_STR   "general"

Definition at line 71 of file mmio.h.

◆ MM_HERM_STR

#define MM_HERM_STR   "hermitian"

Definition at line 73 of file mmio.h.

◆ MM_INT_STR

#define MM_INT_STR   "integer"

Definition at line 70 of file mmio.h.

◆ MM_LINE_TOO_LONG

#define MM_LINE_TOO_LONG   16

Definition at line 47 of file mmio.h.

◆ MM_MAX_LINE_LENGTH

#define MM_MAX_LINE_LENGTH   100025

Definition at line 25 of file mmio.h.

◆ MM_MAX_TOKEN_LENGTH

#define MM_MAX_TOKEN_LENGTH   64

Definition at line 27 of file mmio.h.

◆ MM_MTX_STR

#define MM_MTX_STR   "matrix"

Definition at line 65 of file mmio.h.

◆ MM_NO_HEADER

#define MM_NO_HEADER   14

Definition at line 45 of file mmio.h.

◆ MM_NOT_MTX

#define MM_NOT_MTX   13

Definition at line 44 of file mmio.h.

◆ MM_PATTERN_STR

#define MM_PATTERN_STR   "pattern"

Definition at line 75 of file mmio.h.

◆ MM_PREMATURE_EOF

#define MM_PREMATURE_EOF   12

Definition at line 43 of file mmio.h.

◆ MM_REAL_STR

#define MM_REAL_STR   "real"

Definition at line 69 of file mmio.h.

◆ MM_SKEW_STR

#define MM_SKEW_STR   "skew-symmetric"

Definition at line 74 of file mmio.h.

◆ MM_SPARSE_STR

#define MM_SPARSE_STR   "coordinate"

Definition at line 67 of file mmio.h.

◆ MM_SYMM_STR

#define MM_SYMM_STR   "symmetric"

Definition at line 72 of file mmio.h.

◆ MM_UNSUPPORTED_TYPE

#define MM_UNSUPPORTED_TYPE   15

Definition at line 46 of file mmio.h.

Enumeration Type Documentation

◆ matrix_shape_t

Enumerator
MS_GENERAL 
MS_SYMMETRIC 
MS_HERMITIAN 
MS_SKEW 

Definition at line 29 of file mmio.h.

Function Documentation

◆ mm_read_banner()

int mm_read_banner ( FILE *  f,
MM_typecode matcode 
)

Definition at line 28 of file mmio.c.

References MATRIX_TYPE_COMPLEX, MATRIX_TYPE_INTEGER, MATRIX_TYPE_PATTERN, MATRIX_TYPE_REAL, MatrixMarketBanner, MM_COMPLEX_STR, MM_GENERAL_STR, MM_HERM_STR, MM_INT_STR, MM_MAX_LINE_LENGTH, MM_MAX_TOKEN_LENGTH, MM_MTX_STR, MM_NO_HEADER, MM_PATTERN_STR, MM_PREMATURE_EOF, MM_REAL_STR, MM_SKEW_STR, MM_SPARSE_STR, MM_SYMM_STR, MM_UNSUPPORTED_TYPE, MS_GENERAL, MS_HERMITIAN, MS_SKEW, MS_SYMMETRIC, NULL, MM_typecode::shape, startswith(), and MM_typecode::type.

Referenced by SparseMatrix_import_matrix_market().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mm_read_mtx_crd_size()

int mm_read_mtx_crd_size ( FILE *  f,
int *  M,
int *  N,
int *  nz 
)

Definition at line 92 of file mmio.c.

References M, MM_MAX_LINE_LENGTH, MM_PREMATURE_EOF, N, and NULL.

Referenced by SparseMatrix_import_matrix_market().

Here is the caller graph for this function: