casa
5.7.0-16
|
Global functions for Matrix/Vector input/output using ASCII format. More...
#include <ArrayIO.h>
Public Member Functions | |
template<class T > | |
void | readAsciiMatrix (Matrix< T > &mat, const Char *fileName) |
These routines read and write a Matrix of data. More... | |
template<class T > | |
void | writeAsciiMatrix (const Matrix< T > &mat, const Char *fileName) |
template<class T > | |
void | readAsciiVector (Vector< T > &vec, const Char *fileName) |
These two functions read and write a Vector of data. More... | |
template<class T > | |
void | writeAsciiVector (const Vector< T > &vec, const Char *fileName) |
Global functions for Matrix/Vector input/output using ASCII format.
Public interface
These global functions support file I/O between ASCII files and Matrices or Vectors.
void casacore::ArrayIO_global_functions_Array_Ascii_IO::readAsciiMatrix | ( | Matrix< T > & | mat, |
const Char * | fileName | ||
) |
These routines read and write a Matrix of data.
The first line of input will be examined to determine the number of columns in the matrix. The maximum number of columns provided for is 100. Each item may be up to 50 characters long.
Each item must be separated from others by one (or more) blank column. The "line" may be up to 1024 characters long. Each subsequent line must contain the SAME number of items as the first line but may be any length (up to 1024 characters).
The matrix need NOT be square.
The matrix should be declared but NOT dimensioned in the calling program.
void casacore::ArrayIO_global_functions_Array_Ascii_IO::readAsciiVector | ( | Vector< T > & | vec, |
const Char * | fileName | ||
) |
These two functions read and write a Vector of data.
The input may be arranged in any format (i.e. It may be recorded as one value per line or it may be recorded with all values on a single line). Values must be separated by whitespace.
void casacore::ArrayIO_global_functions_Array_Ascii_IO::writeAsciiMatrix | ( | const Matrix< T > & | mat, |
const Char * | fileName | ||
) |
void casacore::ArrayIO_global_functions_Array_Ascii_IO::writeAsciiVector | ( | const Vector< T > & | vec, |
const Char * | fileName | ||
) |