Mercurial > hg > octave-lyh
diff src/ov-complex.h @ 4944:44046bbaa52c
[project @ 2004-08-31 05:30:46 by jwe]
author | jwe |
---|---|
date | Tue, 31 Aug 2004 05:30:47 +0000 |
parents | c638c144d4da |
children | 7a3a480e8645 |
line wrap: on
line diff
--- a/src/ov-complex.h +++ b/src/ov-complex.h @@ -96,7 +96,14 @@ NDArray array_value (bool = false) const; octave_value resize (const dim_vector& dv) const - { ComplexNDArray retval (dv); if (dv.numel()) retval(0) = scalar; return retval; } + { + ComplexNDArray retval (dv); + + if (dv.numel ()) + retval(0) = scalar; + + return retval; + } Complex complex_value (bool = false) const; @@ -124,6 +131,15 @@ bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug); #endif + int write (octave_stream& os, int block_size, + oct_data_conv::data_type output_type, int skip, + oct_mach_info::float_format flt_fmt) const + { + // Yes, for compatibility, we drop the imaginary part here. + return os.write (array_value (true), block_size, output_type, + skip, flt_fmt); + } + private: DECLARE_OCTAVE_ALLOCATOR