Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
4943:1a499d0c58f5 | 4944:44046bbaa52c |
---|---|
94 Matrix matrix_value (bool = false) const; | 94 Matrix matrix_value (bool = false) const; |
95 | 95 |
96 NDArray array_value (bool = false) const; | 96 NDArray array_value (bool = false) const; |
97 | 97 |
98 octave_value resize (const dim_vector& dv) const | 98 octave_value resize (const dim_vector& dv) const |
99 { ComplexNDArray retval (dv); if (dv.numel()) retval(0) = scalar; return retval; } | 99 { |
100 ComplexNDArray retval (dv); | |
101 | |
102 if (dv.numel ()) | |
103 retval(0) = scalar; | |
104 | |
105 return retval; | |
106 } | |
100 | 107 |
101 Complex complex_value (bool = false) const; | 108 Complex complex_value (bool = false) const; |
102 | 109 |
103 ComplexMatrix complex_matrix_value (bool = false) const; | 110 ComplexMatrix complex_matrix_value (bool = false) const; |
104 | 111 |
122 bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); | 129 bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); |
123 | 130 |
124 bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug); | 131 bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug); |
125 #endif | 132 #endif |
126 | 133 |
134 int write (octave_stream& os, int block_size, | |
135 oct_data_conv::data_type output_type, int skip, | |
136 oct_mach_info::float_format flt_fmt) const | |
137 { | |
138 // Yes, for compatibility, we drop the imaginary part here. | |
139 return os.write (array_value (true), block_size, output_type, | |
140 skip, flt_fmt); | |
141 } | |
142 | |
127 private: | 143 private: |
128 | 144 |
129 DECLARE_OCTAVE_ALLOCATOR | 145 DECLARE_OCTAVE_ALLOCATOR |
130 | 146 |
131 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA | 147 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |