Mercurial > hg > octave-nkf
changeset 19509:8b4a24081e47
Remove redundant methods now that Matrices inherit from NDArrays.
* boolMatrix.cc, boolMatrix.h, chMatrix.cc, chMatrix.h: boolMatrix and
charMatrix are now subclasses of boolNDArray and charNDArray. They now
inherit the methods any, all, diag, and the operator = from their parent
classes.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Mon, 03 Nov 2014 22:18:29 +0000 |
parents | 6c9ea5be96bf |
children | d0c73e23a505 |
files | liboctave/array/boolMatrix.cc liboctave/array/boolMatrix.h liboctave/array/chMatrix.cc liboctave/array/chMatrix.h |
diffstat | 4 files changed, 0 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/boolMatrix.cc +++ b/liboctave/array/boolMatrix.cc @@ -84,20 +84,6 @@ return Array<bool>::diag (k); } -// FIXME: Do these really belong here? Maybe they should be in a base class? - -boolMatrix -boolMatrix::all (int dim) const -{ - return do_mx_red_op<bool, bool> (*this, dim, mx_inline_all); -} - -boolMatrix -boolMatrix::any (int dim) const -{ - return do_mx_red_op<bool, bool> (*this, dim, mx_inline_any); -} - MM_BOOL_OPS (boolMatrix, boolMatrix) MS_BOOL_OPS (boolMatrix, bool) SM_BOOL_OPS (bool, boolMatrix)
--- a/liboctave/array/boolMatrix.h +++ b/liboctave/array/boolMatrix.h @@ -52,12 +52,6 @@ boolMatrix (const boolMatrix& a) : boolNDArray (a) { } - boolMatrix& operator = (const boolMatrix& a) - { - Array<bool>::operator = (a); - return *this; - } - bool operator == (const boolMatrix& a) const; bool operator != (const boolMatrix& a) const; @@ -76,9 +70,6 @@ boolMatrix diag (octave_idx_type k = 0) const; - boolMatrix all (int dim = -1) const; - boolMatrix any (int dim = -1) const; - #if 0 // i/o
--- a/liboctave/array/chMatrix.cc +++ b/liboctave/array/chMatrix.cc @@ -136,26 +136,6 @@ return result; } -charMatrix -charMatrix::diag (octave_idx_type k) const -{ - return Array<char>::diag (k); -} - -// FIXME: Do these really belong here? Maybe they should be in a base class? - -boolMatrix -charMatrix::all (int dim) const -{ - return do_mx_red_op<bool, char> (*this, dim, mx_inline_all); -} - -boolMatrix -charMatrix::any (int dim) const -{ - return do_mx_red_op<bool, char> (*this, dim, mx_inline_any); -} - MS_CMP_OPS (charMatrix, char) MS_BOOL_OPS (charMatrix, char)
--- a/liboctave/array/chMatrix.h +++ b/liboctave/array/chMatrix.h @@ -66,12 +66,6 @@ charMatrix (const string_vector& s, char fill_value = '\0') : charNDArray (s, fill_value) {} - charMatrix& operator = (const charMatrix& a) - { - Array<char>::operator = (a); - return *this; - } - bool operator == (const charMatrix& a) const; bool operator != (const charMatrix& a) const; @@ -95,11 +89,6 @@ Array<char>::resize (dim_vector (nr, nc), rfv); } - charMatrix diag (octave_idx_type k = 0) const; - - boolMatrix all (int dim = -1) const; - boolMatrix any (int dim = -1) const; - #if 0 // i/o