diff liboctave/array/MatrixType.h @ 22246:fa917f1f0faf

MatrixType: remove duplicate code for SparseMatrix and ComplexSparseMatrix. * liboctave/array/MatrixType.cc: constructor for SparseMatrix and ComplexSparseMatrix is exactly the same. With C++11, we have conj, norm, real, and imag functions overloaded for double and float that behave as we would want them to.
author Carnë Draug <carandraug@octave.org>
date Wed, 10 Aug 2016 00:56:51 +0100
parents 1473547f50f5
children bac0d6f07a3e
line wrap: on
line diff
--- a/liboctave/array/MatrixType.h	Tue Aug 09 16:55:36 2016 -0700
+++ b/liboctave/array/MatrixType.h	Wed Aug 10 00:56:51 2016 +0100
@@ -26,6 +26,8 @@
 
 #include "octave-config.h"
 
+#include "MSparse.h"
+
 class Matrix;
 class ComplexMatrix;
 class FloatMatrix;
@@ -68,9 +70,8 @@
 
   MatrixType (const FloatComplexMatrix &a);
 
-  MatrixType (const SparseMatrix &a);
-
-  MatrixType (const SparseComplexMatrix &a);
+  template <typename T>
+  MatrixType (const MSparse<T> &a);
 
   MatrixType (const matrix_type t, bool _full = false);