dbleQR.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 1994-2012 John W. Eaton
00004 Copyright (C) 2008-2009 Jaroslav Hajek
00005 
00006 This file is part of Octave.
00007 
00008 Octave is free software; you can redistribute it and/or modify it
00009 under the terms of the GNU General Public License as published by the
00010 Free Software Foundation; either version 3 of the License, or (at your
00011 option) any later version.
00012 
00013 Octave is distributed in the hope that it will be useful, but WITHOUT
00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00015 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00016 for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with Octave; see the file COPYING.  If not, see
00020 <http://www.gnu.org/licenses/>.
00021 
00022 */
00023 
00024 #if !defined (octave_QR_h)
00025 #define octave_QR_h 1
00026 
00027 #include <iosfwd>
00028 
00029 #include "dMatrix.h"
00030 #include "dColVector.h"
00031 #include "dRowVector.h"
00032 #include "base-qr.h"
00033 
00034 class
00035 OCTAVE_API
00036 QR : public base_qr<Matrix>
00037 {
00038 public:
00039 
00040   // Import them here to allow the QR:: prefix.
00041   typedef qr_type_t type;
00042 
00043   static const type std = qr_type_std;
00044   static const type raw = qr_type_raw;
00045   static const type economy = qr_type_economy;
00046 
00047   QR (void) : base_qr<Matrix> () { }
00048 
00049   QR (const Matrix&, qr_type_t = qr_type_std);
00050 
00051   QR (const Matrix& qx, const Matrix& rx)
00052     : base_qr<Matrix> (qx, rx) { }
00053 
00054   QR (const QR& a) : base_qr<Matrix> (a) { }
00055 
00056   void init (const Matrix&, qr_type_t);
00057 
00058   void update (const ColumnVector& u, const ColumnVector& v);
00059 
00060   void update (const Matrix& u, const Matrix& v);
00061 
00062   void insert_col (const ColumnVector& u, octave_idx_type j);
00063 
00064   void insert_col (const Matrix& u, const Array<octave_idx_type>& j);
00065 
00066   void delete_col (octave_idx_type j);
00067 
00068   void delete_col (const Array<octave_idx_type>& j);
00069 
00070   void insert_row (const RowVector& u, octave_idx_type j);
00071 
00072   void delete_row (octave_idx_type j);
00073 
00074   void shift_cols (octave_idx_type i, octave_idx_type j);
00075 
00076 protected:
00077 
00078   void form (octave_idx_type n, Matrix& afact,
00079              double *tau, qr_type_t qr_type);
00080 };
00081 
00082 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines