diff src/ov-cx-mat.cc @ 5164:57077d0ddc8e

[project @ 2005-02-25 19:55:24 by jwe]
author jwe
date Fri, 25 Feb 2005 19:55:28 +0000 (2005-02-25)
parents 8ca032643f55
children deed800e7bef
line wrap: on
line diff
--- a/src/ov-cx-mat.cc
+++ b/src/ov-cx-mat.cc
@@ -179,6 +179,25 @@
   return matrix.matrix_value ();
 }
 
+SparseMatrix
+octave_complex_matrix::sparse_matrix_value (bool force_conversion) const
+{
+  SparseMatrix retval;
+
+  if (! force_conversion && Vwarn_imag_to_real)
+    gripe_implicit_conversion ("complex matrix", "real matrix");
+
+  retval = SparseMatrix (::real (matrix.matrix_value ()));
+
+  return retval;
+}
+
+SparseComplexMatrix
+octave_complex_matrix::sparse_complex_matrix_value (bool) const
+{
+  return SparseComplexMatrix (matrix.matrix_value ());
+}
+
 static ComplexMatrix
 strip_infnan (const ComplexMatrix& m)
 {