--- trunk/OOPSE-4/src/math/RectMatrix.hpp 2004/10/14 23:28:09 1569 +++ trunk/OOPSE-4/src/math/RectMatrix.hpp 2004/10/17 01:19:11 1586 @@ -448,5 +448,20 @@ namespace oopse { return result; } + + /** + * Write to an output stream + */ + template + std::ostream &operator<< ( std::ostream& o, const RectMatrix& m) { + for (unsigned int i = 0; i < Row ; i++) { + o << "(" + for (unsigned int j = 0; j < Col ; j++) { + o << m(i, j) << "\t" + } + o << ")" << std::endl; + } + return o; + } } #endif //MATH_RECTMATRIX_HPP