diff liboctave/Array.h @ 4559:802818bfac91

[project @ 2003-10-28 19:13:43 by jwe]
author jwe
date Tue, 28 Oct 2003 19:13:43 +0000
parents 820323598f4f
children fc30061d01da
line wrap: on
line diff
--- a/liboctave/Array.h	Tue Oct 28 18:48:07 2003 +0000
+++ b/liboctave/Array.h	Tue Oct 28 19:13:43 2003 +0000
@@ -234,6 +234,7 @@
   int capacity (void) const { return rep->length (); }
   int length (void) const { return capacity (); }
   int nelem (void) const { return capacity (); }
+  int numel (void) const { return nelem (); }
 
   int dim1 (void) const { return dimensions(0); }
   int dim2 (void) const { return dimensions(1); }
@@ -441,6 +442,8 @@
 
   bool is_square (void) const { return (dim1 () == dim2 ()); }
 
+  bool is_empty (void) const { return numel () == 0; }
+
   Array<T> transpose (void) const;
 
   const T *data (void) const { return rep->data; }