Mercurial > octave-nkf
comparison src/ov-flt-re-diag.cc @ 11586:12df7854fa7c
strip trailing whitespace from source files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:24:59 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
11585:1473d0cf86d2 | 11586:12df7854fa7c |
---|---|
34 | 34 |
35 template class octave_base_diag<FloatDiagMatrix, FloatMatrix>; | 35 template class octave_base_diag<FloatDiagMatrix, FloatMatrix>; |
36 | 36 |
37 DEFINE_OCTAVE_ALLOCATOR (octave_float_diag_matrix); | 37 DEFINE_OCTAVE_ALLOCATOR (octave_float_diag_matrix); |
38 | 38 |
39 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_diag_matrix, | 39 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_diag_matrix, |
40 "float diagonal matrix", "single"); | 40 "float diagonal matrix", "single"); |
41 | 41 |
42 static octave_base_value * | 42 static octave_base_value * |
43 default_numeric_conversion_function (const octave_base_value& a) | 43 default_numeric_conversion_function (const octave_base_value& a) |
44 { | 44 { |
111 default: | 111 default: |
112 return to_dense ().map (umap); | 112 return to_dense ().map (umap); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 bool | 116 bool |
117 octave_float_diag_matrix::save_binary (std::ostream& os, | 117 octave_float_diag_matrix::save_binary (std::ostream& os, |
118 bool& /* save_as_floats*/) | 118 bool& /* save_as_floats*/) |
119 { | 119 { |
120 | 120 |
121 int32_t r = matrix.rows (), c = matrix.cols (); | 121 int32_t r = matrix.rows (), c = matrix.cols (); |
135 write_floats (os, mtmp, st, m.numel ()); | 135 write_floats (os, mtmp, st, m.numel ()); |
136 | 136 |
137 return true; | 137 return true; |
138 } | 138 } |
139 | 139 |
140 bool | 140 bool |
141 octave_float_diag_matrix::load_binary (std::istream& is, bool swap, | 141 octave_float_diag_matrix::load_binary (std::istream& is, bool swap, |
142 oct_mach_info::float_format fmt) | 142 oct_mach_info::float_format fmt) |
143 { | 143 { |
144 int32_t r, c; | 144 int32_t r, c; |
145 char tmp; | 145 char tmp; |
162 matrix = m; | 162 matrix = m; |
163 | 163 |
164 return true; | 164 return true; |
165 } | 165 } |
166 | 166 |
167 bool | 167 bool |
168 octave_float_diag_matrix::chk_valid_scalar (const octave_value& val, | 168 octave_float_diag_matrix::chk_valid_scalar (const octave_value& val, |
169 float& x) const | 169 float& x) const |
170 { | 170 { |
171 bool retval = val.is_real_scalar (); | 171 bool retval = val.is_real_scalar (); |
172 if (retval) | 172 if (retval) |
173 x = val.float_value (); | 173 x = val.float_value (); |