Mercurial > hg > octave-lyh
diff liboctave/CmplxQR.cc @ 7700:efccca5f2ad7
more QR & Cholesky updating functions
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 07 Apr 2008 11:43:19 -0400 |
parents | 0ef0f9802a37 |
children | 7c9ba697a479 |
line wrap: on
line diff
--- a/liboctave/CmplxQR.cc +++ b/liboctave/CmplxQR.cc @@ -68,6 +68,10 @@ F77_FUNC (zqrder, ZQRDER) (const octave_idx_type&, const octave_idx_type&, const Complex*, Complex*, const Complex*, Complex *, const octave_idx_type&); + + F77_RET_T + F77_FUNC (zqrshc, ZQRSHC) (const octave_idx_type&, const octave_idx_type&, const octave_idx_type&, + Complex*, Complex*, const octave_idx_type&, const octave_idx_type&); } ComplexQR::ComplexQR (const ComplexMatrix& a, QR::type qr_type) @@ -272,6 +276,19 @@ } void +ComplexQR::shift_cols (octave_idx_type i, octave_idx_type j) +{ + octave_idx_type m = q.rows (); + octave_idx_type k = r.rows (); + octave_idx_type n = r.columns (); + + if (i < 0 || i > n-1 || j < 0 || j > n-1) + (*current_liboctave_error_handler) ("QR shift index out of range"); + else + F77_XFCN (zqrshc, ZQRSHC, (m, n, k, q.fortran_vec (), r.fortran_vec (), i+1, j+1)); +} + +void ComplexQR::economize (void) { octave_idx_type r_nc = r.columns ();