CSS product code  0.1
C++ library to estimate distance of CSS codes. Some particular construction of CSS codes are implemented.
mmio.c File Reference
#include "mmio.h"

Go to the source code of this file.

Functions

int mm_is_valid (MM_typecode matcode)
 
int mm_read_banner (FILE *f, MM_typecode *matcode)
 
int mm_write_mtx_crd_size (FILE *f, int M, int N, int nz)
 
int mm_read_mtx_crd_size (FILE *f, int *M, int *N, int *nz)
 
int mm_read_mtx_array_size (FILE *f, int *M, int *N)
 
int mm_write_mtx_array_size (FILE *f, int M, int N)
 
int mm_read_mtx_crd_data (FILE *f, int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
 
int mm_read_mtx_crd_entry (FILE *f, int *I, int *J, double *real, double *imag, MM_typecode matcode)
 
int mm_read_mtx_crd (char *fname, int *M, int *N, int *nz, int **I, int **J, double **val, MM_typecode *matcode)
 
int mm_write_banner (FILE *f, MM_typecode matcode)
 
int mm_write_mtx_crd (char fname[], int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
 
char * mm_strdup (const char *s)
 
char * mm_typecode_to_str (MM_typecode matcode)
 

Function Documentation

◆ mm_is_valid()

int mm_is_valid ( MM_typecode  matcode)

Definition at line 84 of file mmio.c.

◆ mm_read_banner()

int mm_read_banner ( FILE *  f,
MM_typecode matcode 
)

Definition at line 94 of file mmio.c.

◆ mm_read_mtx_array_size()

int mm_read_mtx_array_size ( FILE *  f,
int *  M,
int *  N 
)

Definition at line 218 of file mmio.c.

◆ mm_read_mtx_crd()

int mm_read_mtx_crd ( char *  fname,
int *  M,
int *  N,
int *  nz,
int **  I,
int **  J,
double **  val,
MM_typecode matcode 
)

Definition at line 331 of file mmio.c.

◆ mm_read_mtx_crd_data()

int mm_read_mtx_crd_data ( FILE *  f,
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)

Definition at line 263 of file mmio.c.

◆ mm_read_mtx_crd_entry()

int mm_read_mtx_crd_entry ( FILE *  f,
int *  I,
int *  J,
double *  real,
double *  imag,
MM_typecode  matcode 
)

Definition at line 296 of file mmio.c.

◆ mm_read_mtx_crd_size()

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

Definition at line 187 of file mmio.c.

◆ mm_strdup()

char* mm_strdup ( const char *  s)

Create a new copy of a string s. mm_strdup() is a common routine, but not part of ANSI C, so it is included here. Used by mm_typecode_to_str().

Definition at line 446 of file mmio.c.

◆ mm_typecode_to_str()

char* mm_typecode_to_str ( MM_typecode  matcode)

Definition at line 453 of file mmio.c.

◆ mm_write_banner()

int mm_write_banner ( FILE *  f,
MM_typecode  matcode 
)

Definition at line 384 of file mmio.c.

◆ mm_write_mtx_array_size()

int mm_write_mtx_array_size ( FILE *  f,
int  M,
int  N 
)

Definition at line 247 of file mmio.c.

◆ mm_write_mtx_crd()

int mm_write_mtx_crd ( char  fname[],
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)

Definition at line 397 of file mmio.c.

◆ mm_write_mtx_crd_size()

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

Definition at line 179 of file mmio.c.