Mercurial > octave
comparison liboctave/numeric/floatQR.cc @ 18084:8e056300994b
Follow coding convention of defining and initializing only 1 variable per line in liboctave.
* liboctave/array/Array-b.cc, liboctave/array/Array-util.cc,
liboctave/array/Array.cc, liboctave/array/CDiagMatrix.cc,
liboctave/array/CMatrix.cc, liboctave/array/CSparse.cc,
liboctave/array/MDiagArray2.cc, liboctave/array/MatrixType.cc,
liboctave/array/PermMatrix.cc, liboctave/array/Sparse.cc,
liboctave/array/Sparse.h, liboctave/array/boolSparse.cc,
liboctave/array/dDiagMatrix.cc, liboctave/array/dMatrix.cc,
liboctave/array/dSparse.cc, liboctave/array/dim-vector.cc,
liboctave/array/fCDiagMatrix.cc, liboctave/array/fCMatrix.cc,
liboctave/array/fDiagMatrix.cc, liboctave/array/fMatrix.cc,
liboctave/array/idx-vector.cc, liboctave/array/idx-vector.h,
liboctave/numeric/CmplxLU.cc, liboctave/numeric/CmplxQR.cc,
liboctave/numeric/base-qr.cc, liboctave/numeric/bsxfun-defs.cc,
liboctave/numeric/bsxfun.h, liboctave/numeric/dbleLU.cc,
liboctave/numeric/dbleQR.cc, liboctave/numeric/fCmplxLU.cc,
liboctave/numeric/fCmplxQR.cc, liboctave/numeric/floatLU.cc,
liboctave/numeric/floatQR.cc, liboctave/numeric/lo-specfun.cc,
liboctave/numeric/oct-convn.cc, liboctave/numeric/oct-norm.cc,
liboctave/numeric/sparse-dmsolve.cc, liboctave/operators/mx-inlines.cc,
liboctave/operators/mx-op-defs.h, liboctave/util/caseless-str.h,
liboctave/util/kpse.cc, liboctave/util/lo-utils.cc,
liboctave/util/oct-binmap.h, liboctave/util/oct-cmplx.h,
liboctave/util/oct-inttypes.cc, liboctave/util/oct-inttypes.h,
liboctave/util/oct-sort.cc:
Follow coding convention of defining and initializing only 1 variable per line in liboctave.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 04 Dec 2013 22:13:18 -0800 |
parents | 49a5a4be04a1 |
children | d47e50953abc |
comparison
equal
deleted
inserted
replaced
18083:938f01339043 | 18084:8e056300994b |
---|---|
134 } | 134 } |
135 | 135 |
136 void FloatQR::form (octave_idx_type n, FloatMatrix& afact, | 136 void FloatQR::form (octave_idx_type n, FloatMatrix& afact, |
137 float *tau, qr_type_t qr_type) | 137 float *tau, qr_type_t qr_type) |
138 { | 138 { |
139 octave_idx_type m = afact.rows (), min_mn = std::min (m, n); | 139 octave_idx_type m = afact.rows (); |
140 octave_idx_type min_mn = std::min (m, n); | |
140 octave_idx_type info; | 141 octave_idx_type info; |
141 | 142 |
142 if (qr_type == qr_type_raw) | 143 if (qr_type == qr_type_raw) |
143 { | 144 { |
144 for (octave_idx_type j = 0; j < min_mn; j++) | 145 for (octave_idx_type j = 0; j < min_mn; j++) |
210 octave_idx_type n = r.columns (); | 211 octave_idx_type n = r.columns (); |
211 octave_idx_type k = q.columns (); | 212 octave_idx_type k = q.columns (); |
212 | 213 |
213 if (u.length () == m && v.length () == n) | 214 if (u.length () == m && v.length () == n) |
214 { | 215 { |
215 FloatColumnVector utmp = u, vtmp = v; | 216 FloatColumnVector utmp = u; |
217 FloatColumnVector vtmp = v; | |
216 OCTAVE_LOCAL_BUFFER (float, w, 2*k); | 218 OCTAVE_LOCAL_BUFFER (float, w, 2*k); |
217 F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (), | 219 F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (), |
218 m, r.fortran_vec (), k, | 220 m, r.fortran_vec (), k, |
219 utmp.fortran_vec (), vtmp.fortran_vec (), w)); | 221 utmp.fortran_vec (), vtmp.fortran_vec (), w)); |
220 } | 222 } |
232 if (u.rows () == m && v.rows () == n && u.cols () == v.cols ()) | 234 if (u.rows () == m && v.rows () == n && u.cols () == v.cols ()) |
233 { | 235 { |
234 OCTAVE_LOCAL_BUFFER (float, w, 2*k); | 236 OCTAVE_LOCAL_BUFFER (float, w, 2*k); |
235 for (volatile octave_idx_type i = 0; i < u.cols (); i++) | 237 for (volatile octave_idx_type i = 0; i < u.cols (); i++) |
236 { | 238 { |
237 FloatColumnVector utmp = u.column (i), vtmp = v.column (i); | 239 FloatColumnVector utmp = u.column (i); |
240 FloatColumnVector vtmp = v.column (i); | |
238 F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (), | 241 F77_XFCN (sqr1up, SQR1UP, (m, n, k, q.fortran_vec (), |
239 m, r.fortran_vec (), k, | 242 m, r.fortran_vec (), k, |
240 utmp.fortran_vec (), vtmp.fortran_vec (), | 243 utmp.fortran_vec (), vtmp.fortran_vec (), |
241 w)); | 244 w)); |
242 } | 245 } |