1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
8 ////////////////////////////////////////////////////////////////////////////////
13 ////////////////////////////////////////////////////////////////////////////////
15 template<typename T, typename S>
16 void print_matrix(std::ostream& device, const matrix<T>& values,
18 const std::string& column_separator,
19 const std::string& row_separator)
21 for (unsigned r = 0; r < values.rows(); r++)
23 if (r != 0) device << row_separator;
24 for (unsigned c = 0; c < values.columns(); c++)
26 if (c != 0) device << column_separator;
27 print_fn(device, values(r,c));
32 } // end namespace stlplus