diff liboctave/array/dMatrix.h @ 19511:3746b92739f7

Replace some duplicated code and count on methods implemented on base classes. * liboctave/array/CMatrix.cc, liboctave/array/CMatrix.h, liboctave/array/dMatrix.cc, liboctave/array/dMatrix.h, liboctave/array/fCMatrix.cc, liboctave/array/fCMatrix.h, liboctave/array/fMatrix.cc, liboctave/array/fMatrix.h: remove a lot of duplicate code from Matrix type classes now that these classes inherit from their NDArrays counterpart. These mostly include operator ! and =, any_element_is_nan, any_element_is_inf_or_nan, all_elements_are_real, all_integers, too_large_for_float, all, any, cumprod, cumsum, prod, sum, sumsq, and abs. In some cases these need to still appear on the Matrix definition to avoid slicing.
author Carnë Draug <carandraug@octave.org>
date Fri, 07 Nov 2014 10:41:18 +0000
parents d0c73e23a505
children 385499581a5e
line wrap: on
line diff
--- a/liboctave/array/dMatrix.h
+++ b/liboctave/array/dMatrix.h
@@ -76,12 +76,6 @@
 
   explicit Matrix (const charMatrix& a);
 
-  Matrix& operator = (const Matrix& a)
-  {
-    MArray<double>::operator = (a);
-    return *this;
-  }
-
   bool operator == (const Matrix& a) const;
   bool operator != (const Matrix& a) const;
 
@@ -304,19 +298,8 @@
 
   // unary operations
 
-  boolMatrix operator ! (void) const;
-
   // other operations
 
-  bool any_element_is_negative (bool = false) const;
-  bool any_element_is_positive (bool = false) const;
-  bool any_element_is_nan (void) const;
-  bool any_element_is_inf_or_nan (void) const;
-  bool any_element_not_one_or_zero (void) const;
-  bool all_elements_are_int_or_inf_or_nan (void) const;
-  bool all_integers (double& max_val, double& min_val) const;
-  bool too_large_for_float (void) const;
-
   boolMatrix all (int dim = -1) const;
   boolMatrix any (int dim = -1) const;