Mercurial > hg > octave-nkf
diff liboctave/array/CMatrix.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/CMatrix.h +++ b/liboctave/array/CMatrix.h @@ -85,12 +85,6 @@ explicit ComplexMatrix (const charMatrix& a); - ComplexMatrix& operator = (const ComplexMatrix& a) - { - ComplexNDArray::operator = (a); - return *this; - } - bool operator == (const ComplexMatrix& a) const; bool operator != (const ComplexMatrix& a) const; @@ -357,18 +351,8 @@ ComplexMatrix& operator += (const Matrix& a); ComplexMatrix& operator -= (const Matrix& a); - // unary operations - - boolMatrix operator ! (void) const; - // other operations - bool any_element_is_nan (void) const; - bool any_element_is_inf_or_nan (void) const; - bool all_elements_are_real (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;