Mercurial > hg > octave-lyh
diff src/ov-struct.h @ 5900:c20eb7330d13
[project @ 2006-07-22 08:31:16 by jwe]
author | jwe |
---|---|
date | Sat, 22 Jul 2006 08:31:17 +0000 |
parents | c5b54890f3d1 |
children | cdef72fcd206 |
line wrap: on
line diff
--- a/src/ov-struct.h +++ b/src/ov-struct.h @@ -87,6 +87,16 @@ size_t byte_size (void) const; + // This is the number of elements in each field. The total number + // of elements is numel () * nfields (). + octave_idx_type numel (void) const + { + dim_vector dv = dims (); + return dv.numel (); + } + + octave_idx_type nfields (void) const { return map.length (); } + octave_value reshape (const dim_vector& new_dims) const { return map.reshape (new_dims); } @@ -123,6 +133,8 @@ bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug); #endif + mxArray *as_mxArray (void) const; + private: // The associative array used to manage the structure data.