42 #ifndef COO_MATRIX_TMPL_OUT_FUNC_DEF_H
43 #define COO_MATRIX_TMPL_OUT_FUNC_DEF_H
50 namespace AbstractLinAlgPack {
52 template <
class T_COOM>
53 std::ostream&
output_COOM(std::ostream& os,
const T_COOM& coom
56 int w = os.width(0) - 1;
59 || !(extra_flags & SparseLinAlgPackIO::ignore_nz_bit) )
64 if( !(extra_flags & SparseLinAlgPackIO::ignore_dim_bit) )
65 os << coom.rows() <<
' ' << coom.cols() <<
' ';
67 if( !(extra_flags & SparseLinAlgPackIO::ignore_nz_bit) )
73 if(!coom.nz())
return os;
75 typename T_COOM::difference_type
76 row_offset = coom.row_offset(),
77 col_offset = coom.col_offset();
78 for(
typename T_COOM::const_iterator itr = coom.begin(); itr != coom.end();++itr) {
79 os <<
" " << std::setw(w) << itr->value()
80 <<
':' << itr->row_i() + row_offset
81 <<
':' << itr->col_j() + col_offset;
92 #endif // COO_MATRIX_TMPL_OUT_FUNC_DEF_H
std::ostream & output_COOM(std::ostream &os, const T_COOM &coom, SparseLinAlgPackIO::fmtflags extra_flags)
const f_int f_dbl_prec const f_int f_int const f_int f_int const f_dbl_prec f_int f_int f_dbl_prec w[]
std::ios_base::fmtflags fmtflags