diff src/ov-re-mat.cc @ 4513:508238e65af7

[project @ 2003-09-19 21:40:57 by jwe]
author jwe
date Fri, 19 Sep 2003 21:41:21 +0000
parents d7d9ca19960a
children d44675070f1a
line wrap: on
line diff
--- a/src/ov-re-mat.cc	Sat Sep 13 07:53:55 2003 +0000
+++ b/src/ov-re-mat.cc	Fri Sep 19 21:41:21 2003 +0000
@@ -53,7 +53,7 @@
 #define UCHAR_MAX 255
 #endif
 
-template class octave_base_matrix<Matrix>;
+template class octave_base_matrix<NDArray>;
 
 DEFINE_OCTAVE_ALLOCATOR (octave_matrix);
 
@@ -64,11 +64,8 @@
 {
   octave_value *retval = 0;
 
-  int nr = matrix.rows ();
-  int nc = matrix.cols ();
-
-  if (nr == 1 && nc == 1)
-    retval = new octave_scalar (matrix (0, 0));
+  if (matrix.nelem () == 1)
+    retval = new octave_scalar (matrix (0));
 
   return retval;
 }
@@ -100,6 +97,14 @@
   return retval;
 }
 
+// XXX FIXME XXX
+
+Matrix
+octave_matrix::matrix_value (bool) const
+{
+  return matrix.matrix_value ();
+}
+
 Complex
 octave_matrix::complex_value (bool) const
 {
@@ -122,6 +127,14 @@
   return retval;
 }
 
+// XXX FIXME XXX
+
+ComplexMatrix
+octave_matrix::complex_matrix_value (bool) const
+{
+  return ComplexMatrix (matrix.matrix_value ());
+}
+
 octave_value
 octave_matrix::convert_to_str_internal (bool, bool) const
 {