Verified Commit fc4fae46 authored by Tim Gymnich's avatar Tim Gymnich
Browse files

implemented << operator

parent bb713587
......@@ -342,5 +342,17 @@ inline Matrix<T> operator-(Matrix<T> lhs, Matrix<T> const& rhs) { return lhs -=
template <typename T>
inline Matrix<T> operator-(Matrix<T> lhs, T scalar) { return lhs -= scalar; };
template <typename T>
llvm::raw_ostream& operator<<(llvm::raw_ostream& os, Matrix<T> matrix) {
for (int row = 0; row < matrix.getHeight(); row++) {
os << "[\t";
for (int column = 0; column < matrix.getWidth(); column++) {
os << matrix(row,column) << " \t";
}
os << "]\n";
}
return os;
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment