Mercurial > octave
diff src/ov-struct.h @ 4200:1f04df06e1a6
[project @ 2002-11-22 16:25:49 by jwe]
author | jwe |
---|---|
date | Fri, 22 Nov 2002 16:25:49 +0000 |
parents | 5719210fff4c |
children | 23d06c9e1edd |
line wrap: on
line diff
--- a/src/ov-struct.h Thu Nov 21 20:47:49 2002 +0000 +++ b/src/ov-struct.h Fri Nov 22 16:25:49 2002 +0000 @@ -79,6 +79,18 @@ const SLList<octave_value_list>& idx, const octave_value& rhs); + int rows (void) const { return map.rows (); } + + int columns (void) const { return map.columns (); } + + int length (void) const + { + int r = rows (); + int c = columns (); + + return (r == 0 || c == 0) ? 0 : ((r > c) ? r : c); + } + bool is_defined (void) const { return true; } bool is_constant (void) const { return true; }