#define MSP_LINAL_DYNAMICMATRIX_H_
#include <algorithm>
+#include <ostream>
#include "dynamicvector.h"
#include "matrixops.h"
return r.invert();
}
+template<typename T>
+inline std::ostream &operator<<(std::ostream &s, const DynamicMatrix<T> &m)
+{
+ s << "DynamicMatrix" << m.rows() << 'x' << m.columns() << '(';
+ for(unsigned i=0; i<m.columns(); ++i)
+ {
+ if(i)
+ s << ", ";
+ s << '[';
+ for(unsigned j=0; j<m.rows(); ++j)
+ {
+ if(j)
+ s << ", ";
+ s << m(j, i);
+ }
+ s << ']';
+ }
+ s << ')';
+ return s;
+}
+
} // namespace LinAl
} // namespace Msp