Mercurial > hg > octave-lyh
diff src/ov.h @ 4559:802818bfac91
[project @ 2003-10-28 19:13:43 by jwe]
author | jwe |
---|---|
date | Tue, 28 Oct 2003 19:13:43 +0000 |
parents | 78e34346f6fd |
children | 742993a501b9 |
line wrap: on
line diff
--- a/src/ov.h +++ b/src/ov.h @@ -331,6 +331,9 @@ virtual int ndims (void) const { return rep->ndims (); } + virtual int numel (void) const + { return rep->numel (); } + // Does this constant have a type? Both of these are provided since // it is sometimes more natural to write is_undefined() instead of // ! is_defined(). @@ -341,6 +344,9 @@ bool is_undefined (void) const { return ! is_defined (); } + bool is_empty (void) const + { return numel () == 0; } + virtual bool is_cell (void) const { return rep->is_cell (); } @@ -425,11 +431,6 @@ virtual bool is_true (void) const { return rep->is_true (); } - // Is at least one of the dimensions of this constant zero? - - virtual bool is_empty (void) const - { return rep->is_empty (); } - // Are the dimensions of this constant zero by zero? virtual bool is_zero_by_zero (void) const