Scythe-1.0.3
template<typename T_type = double, matrix_order ORDER = Col, matrix_style STYLE = Concrete>
void scythe::Matrix< T_type, ORDER, STYLE >::save ( const std::string &  path,
const char  flag = 'n',
const bool  header = false 
) const [inline]

Saves a Matrix to disk.

This method writes the contents of this Matrix to the file specified by path. The user can control file overwriting with flag. The parameter header controls the output style. When one sets header to true the Matrix is written as a space-separated list of values, with the number of rows and columns placed in the first two positions in the list. If header is set to false, the file is written as a space separated ascii block, with end-of-lines indicating ends of rows. The Matrix is always written out in row-major order.

Parameters:
pathThe name of the file to write.
flagOverwrite flag taking values 'a': append, 'o': overwrite, or 'n': do not replace.
headerBoolean value indicating whether to write as a flat list with dimension header or as a rectangular block.
See also:
Matrix(const std::string& file)
operator>>(std::istream& is, Matrix<T,O,S>& M)
Exceptions:
scythe_invalid_arg(Level 0)
scythe_file_error(Level 0)