NAME
write_int_matrix_with_header - Writes an integer matrix to a file row-wise with header
SYNOPSIS
#include "l/l_int_mat_io.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int write_int_matrix_with_header
(
const Int_matrix *mp,
const char *file_name
);
DESCRIPTION
This routine outputs an integer matrix to a file specified by the input file
name row by row with a header.
"file_name" is a pointer to a character array containing the name of the file
to write the matrix contents to. If "file_name" is NULL or equal to '\0',
output is directed to STDOUT. Otherwise, the file is created or the existing
copy is overwritten.
"mp" is a pointer to the matrix whose contents are to be written. If the
matrix is NULL, then this routine writes a matrix with 0 rows and 0 columns
which will become a NULL matrix with the anologous read routine.
The matrix * size header has the form:
#! rows=<num-matrix-rows> cols=<num-matrix-cols>
where <num-matrix-rows>,<num-matrix-cols> are positive integers.
(The "#" is actually the comment char (user settable) and the "!" is actually
the header char, also user settable).
RETURNS
NO_ERROR on success, or ERROR on a file write or close error.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
read_int_matrix_from_config_file
,
read_int_matrix
,
fp_read_int_matrix
,
fp_read_raw_int_matrix
,
fp_read_int_matrix_from_matlab_file
,
fp_read_int_matrix_with_header
,
fp_read_formatted_int_matrix
,
read_int_matrix_by_rows
,
fp_read_int_matrix_by_rows
,
read_int_matrix_by_cols
,
fp_read_int_matrix_by_cols
,
fp_ow_read_formatted_int_matrix
,
fp_ow_read_int_matrix_by_rows
,
fp_ow_read_int_matrix_by_cols
,
fp_read_matrix_size_header
,
fp_write_int_matrix_with_title
,
write_int_matrix
,
fp_write_int_matrix
,
write_raw_int_matrix
,
fp_write_raw_int_matrix
,
write_int_matrix_rows
,
fp_write_int_matrix_rows
,
write_int_matrix_cols
,
fp_write_int_matrix_cols
,
fp_write_int_matrix_with_header
,
fp_write_matrix_size_header
,
write_int_matrix_to_matlab_file
,
fp_write_int_matrix_to_matlab_file