M4RI  1.0.1
Functions
io.h File Reference

Input/output routines for matrices. More...

#include <m4ri/m4ri_config.h>
#include <m4ri/mzd.h>

Go to the source code of this file.

Functions

void mzd_print (mzd_t const *M)
 Print a matrix to stdout.
void mzd_info (const mzd_t *A, int do_rank)
 Print compact information about the matrix to stdout.
mzd_tmzd_from_jcf (const char *fn, int verbose)
 Read matrix from ASCII file in JCF format.

Detailed Description

Input/output routines for matrices.

Author
Martin Albrecht marti.nosp@m.nral.nosp@m.brech.nosp@m.t@go.nosp@m.oglem.nosp@m.ail..nosp@m.com

Function Documentation

mzd_t* mzd_from_jcf ( const char *  fn,
int  verbose 
)

Read matrix from ASCII file in JCF format.

The format is as follows:

nrows ncols modulus
nonzero_entries_upper_bound
column_index

where a negative column_index indicates a row_index increase by one and a non-zero entry at index -column_index.

Note
the JCF format is one-based in contrast to everything else in this library which is zero-based.

For example, a valid input is:

2 3 2
3

-2
-1
-2

which produces the matrix

[0 1]
[1 1]
Parameters
fnFilename
verbosePrint error message to stdout if != 0
void mzd_info ( const mzd_t A,
int  do_rank 
)

Print compact information about the matrix to stdout.

Prints number of rows, number of columns, density (and rank).

Parameters
AMatrix
do_rankAlso display the rank (expensive)
void mzd_print ( mzd_t const *  M)

Print a matrix to stdout.

The output will contain colons between every 4-th column.

Parameters
MMatrix