1831: Improve ctors of mln::algebra::mat.

https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Ugo Jardonnet <ugo.jardonnet@lrde.epita.fr> Improve ctors of mln::algebra::mat. * mln/algebra/mat.hh (mat(const literal::zero_t&)): Add ctor. mat.hh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) Index: mln/algebra/mat.hh --- mln/algebra/mat.hh (revision 1831) +++ mln/algebra/mat.hh (working copy) @@ -95,9 +95,9 @@ static const mat<n,m,T> Id; - mat() - { - } + mat(); + + mat(const literal::zero_t&); template <typename U> mat(const mat<n,m,U>& rhs); @@ -280,6 +280,19 @@ } template <unsigned n, unsigned m, typename T> + inline + mat<n,m,T>::mat() + { + } + + template <unsigned n, unsigned m, typename T> + inline + mat<n,m,T>::mat(const literal::zero_t&) + { + this->set_all(0); + } + + template <unsigned n, unsigned m, typename T> template <typename U> inline mat<n,m,T>::mat(const mat<n,m,U>& rhs)
participants (1)
-
Ugo Jardonnet