Add matrix stream output operator
This commit is contained in:
parent
918858aea5
commit
c525383a42
1 changed files with 12 additions and 0 deletions
|
|
@ -268,4 +268,16 @@ namespace psemek::geom
|
|||
return result;
|
||||
}
|
||||
|
||||
template <typename Stream, typename T, std::size_t R, std::size_t C>
|
||||
Stream & operator << (Stream & os, matrix<T, R, C> const & m)
|
||||
{
|
||||
for (std::size_t i = 0; i < R; ++i)
|
||||
{
|
||||
for (std::size_t j = 0; j < C; ++j)
|
||||
os << m[i][j] << ' ';
|
||||
os << '\n';
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue