comparison src/ov-flt-cx-diag.cc @ 10315:57a59eae83cc

untabify src C++ source files
author John W. Eaton <jwe@octave.org>
date Thu, 11 Feb 2010 12:41:46 -0500
parents f80c566bc751
children 0eb323b71957
comparison
equal deleted inserted replaced
10314:07ebe522dac2 10315:57a59eae83cc
84 { 84 {
85 DiagMatrix retval; 85 DiagMatrix retval;
86 86
87 if (! force_conversion) 87 if (! force_conversion)
88 gripe_implicit_conversion ("Octave:imag-to-real", 88 gripe_implicit_conversion ("Octave:imag-to-real",
89 type_name (), "real matrix"); 89 type_name (), "real matrix");
90 90
91 retval = ::real (matrix); 91 retval = ::real (matrix);
92 92
93 return retval; 93 return retval;
94 } 94 }
98 { 98 {
99 DiagMatrix retval; 99 DiagMatrix retval;
100 100
101 if (! force_conversion) 101 if (! force_conversion)
102 gripe_implicit_conversion ("Octave:imag-to-real", 102 gripe_implicit_conversion ("Octave:imag-to-real",
103 type_name (), "real matrix"); 103 type_name (), "real matrix");
104 104
105 retval = ::real (matrix); 105 retval = ::real (matrix);
106 106
107 return retval; 107 return retval;
108 } 108 }
158 save_type st = LS_FLOAT; 158 save_type st = LS_FLOAT;
159 if (matrix.length () > 4096) // FIXME -- make this configurable. 159 if (matrix.length () > 4096) // FIXME -- make this configurable.
160 { 160 {
161 float max_val, min_val; 161 float max_val, min_val;
162 if (m.all_integers (max_val, min_val)) 162 if (m.all_integers (max_val, min_val))
163 st = get_save_type (max_val, min_val); 163 st = get_save_type (max_val, min_val);
164 } 164 }
165 165
166 const FloatComplex *mtmp = m.data (); 166 const FloatComplex *mtmp = m.data ();
167 write_floats (os, reinterpret_cast<const float *> (mtmp), st, 2 * m.numel ()); 167 write_floats (os, reinterpret_cast<const float *> (mtmp), st, 2 * m.numel ());
168 168
169 return true; 169 return true;
170 } 170 }
171 171
172 bool 172 bool
173 octave_float_complex_diag_matrix::load_binary (std::istream& is, bool swap, 173 octave_float_complex_diag_matrix::load_binary (std::istream& is, bool swap,
174 oct_mach_info::float_format fmt) 174 oct_mach_info::float_format fmt)
175 { 175 {
176 int32_t r, c; 176 int32_t r, c;
177 char tmp; 177 char tmp;
178 if (! (is.read (reinterpret_cast<char *> (&r), 4) 178 if (! (is.read (reinterpret_cast<char *> (&r), 4)
179 && is.read (reinterpret_cast<char *> (&c), 4) 179 && is.read (reinterpret_cast<char *> (&c), 4)