Function matrix_out (o2scl)¶
-
template<class mat_t>
void o2scl::matrix_out(std::ostream &os, size_t nrows, size_t ncols, const mat_t &A, std::string prefix = "")¶ A operator for simple matrix output using
operator()
The type
mat_t
can be any matrix type which allows individual element access usingoperator()(size_t,size_t)
.This outputs all of the matrix elements using output settings specified by
os
. The alignment performed by columnify using columnify::align_dp, i.e. the numbers are aligned by their decimal points. If the numbers have no decimal points, then the decimal point is assumed to be to the right of the last character in the string representation of the number.This function outputs the matrix assuming the first index is the row index and the second index is the column index. For the opposite convention, use matrix_trans_out().
-
template<class mat_t>
void o2scl::matrix_out(std::ostream &os, const mat_t &A, std::string prefix = "")¶ A operator for simple matrix output using
operator()
The type
mat_t
can be any matrix type which allows individual element access usingoperator()(size_t,size_t)
and access to the number of columns and rows usingA.size1()
andA.size2()
.This outputs all of the matrix elements using output settings specified by
os
. The alignment performed by columnify using columnify::align_dp, i.e. the numbers are aligned by their decimal points. If the numbers have no decimal points, then the decimal point is assumed to be to the right of the last character in the string representation of the number.This function outputs the matrix assuming the first index is the row index and the second index is the column index. For the opposite convention, use matrix_trans_out().