#define MSP_LINAL_MATRIX_H_
#include <algorithm>
+#include <ostream>
#include "vector.h"
namespace Msp {
return r;
}
+template<typename T, unsigned M, unsigned N>
+inline std::ostream &operator<<(std::ostream &s, const Matrix<T, M, N> &m)
+{
+ s << "Matrix" << M << 'x' << N << '(';
+ for(unsigned i=0; i<N; ++i)
+ {
+ if(i)
+ s << ", ";
+ s << '[';
+ for(unsigned j=0; j<M; ++j)
+ {
+ if(j)
+ s << ", ";
+ s << m(j, i);
+ }
+ s << ']';
+ }
+ s << ')';
+ return s;
+}
+
} // namespace LinAl
} // namespace Msp