/**
* Assignment operator.
* Copy all elements of #src#
- into the matrix. The size is
- adjusted if needed.
+ * into the matrix. The size is
+ * adjusted if needed.
+ *
+ * We can't use the other, templatized
+ * version since if we don't declare
+ * this one, the compiler will happily
+ * generate a predefined copy
+ * operator which is not what we want.
+ */
+ FullMatrix<number>& operator = (const FullMatrix<number>& src);
+
+ /**
+ * Assignment operator.
+ * Copy all elements of #src#
+ * into the matrix. The size is
+ * adjusted if needed.
*/
template<typename number2>
FullMatrix<number>& operator = (const FullMatrix<number2>& src);
+template <typename number>
+FullMatrix<number>&
+FullMatrix<number>::operator = (const FullMatrix<number>& m)
+{
+ reinit(m);
+
+ number * p = &val[0];
+ const number * vp = &m.val[0];
+ const number * const e = &val[dim_image*dim_range];
+
+ while (p!=e)
+ *p++ = *vp++;
+
+ return *this;
+}
+
+
+
template <typename number>
template <typename number2>
FullMatrix<number>&