Next: Sparse Matrices Copying, Previous: Sparse Matrices Initializing Elements, Up: Sparse Matrices [Index]
This function writes the elements of the matrix m to the stream
stream in binary format. The return value is 0 for success and
GSL_EFAILED
if there was a problem writing to the file. Since the
data is written in the native binary format it may not be portable
between different architectures.
This function reads into the matrix m from the open stream
stream in binary format. The matrix m must be preallocated
with the correct storage format, dimensions and have a sufficiently large nzmax
in order to read in all matrix elements, otherwise GSL_EBADLEN
is returned. The return value is 0 for success and
GSL_EFAILED
if there was a problem reading from the file. The
data is assumed to have been written in the native binary format on the
same architecture.
This function writes the elements of the matrix m line-by-line to
the stream stream using the format specifier format, which
should be one of the %g
, %e
or %f
formats for
floating point numbers. The function returns 0 for success and
GSL_EFAILED
if there was a problem writing to the file. The
input matrix m may be in any storage format, and the output file
will be written in MatrixMarket format.
This function reads sparse matrix data in the MatrixMarket format
from the stream stream and stores it in a newly allocated matrix
which is returned in triplet format. The function returns 0 for success and
GSL_EFAILED
if there was a problem reading from the file. The
user should free the returned matrix when it is no longer needed.
Next: Sparse Matrices Copying, Previous: Sparse Matrices Initializing Elements, Up: Sparse Matrices [Index]