diff liboctave/dMatrix.cc @ 1574:dd7d27461567

[project @ 1995-10-19 04:34:20 by jwe]
author jwe
date Thu, 19 Oct 1995 04:34:44 +0000
parents ffee86c37931
children 23aa282707e8
line wrap: on
line diff
--- a/liboctave/dMatrix.cc	Thu Oct 19 04:34:20 1995 +0000
+++ b/liboctave/dMatrix.cc	Thu Oct 19 04:34:44 1995 +0000
@@ -93,6 +93,17 @@
     elem (i, i) = a.elem (i, i);
 }
 
+// XXX FIXME XXX -- could we use a templated mixed-type copy function
+// here?
+
+Matrix::Matrix (const charMatrix& a)
+  : MArray2<double> (a.rows (), a.cols ())
+{
+  for (int i = 0; i < a.rows (); i++)
+    for (int j = 0; j < a.cols (); j++)
+      elem (i, j) = a.elem (i, j);
+}
+
 int
 Matrix::operator == (const Matrix& a) const
 {