00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #if !defined (octave_QR_h)
00026 #define octave_QR_h 1
00027
00028 #include <iosfwd>
00029
00030 #include "dMatrix.h"
00031 #include "dColVector.h"
00032 #include "dRowVector.h"
00033 #include "base-qr.h"
00034
00035 class
00036 OCTAVE_API
00037 QR : public base_qr<Matrix>
00038 {
00039 public:
00040
00041
00042 typedef qr_type_t type;
00043
00044 static const type std = qr_type_std;
00045 static const type raw = qr_type_raw;
00046 static const type economy = qr_type_economy;
00047
00048 QR (void) : base_qr<Matrix> () { }
00049
00050 QR (const Matrix&, qr_type_t = qr_type_std);
00051
00052 QR (const Matrix& qx, const Matrix& rx)
00053 : base_qr<Matrix> (qx, rx) { }
00054
00055 QR (const QR& a) : base_qr<Matrix> (a) { }
00056
00057 void init (const Matrix&, qr_type_t);
00058
00059 void update (const ColumnVector& u, const ColumnVector& v);
00060
00061 void update (const Matrix& u, const Matrix& v);
00062
00063 void insert_col (const ColumnVector& u, octave_idx_type j);
00064
00065 void insert_col (const Matrix& u, const Array<octave_idx_type>& j);
00066
00067 void delete_col (octave_idx_type j);
00068
00069 void delete_col (const Array<octave_idx_type>& j);
00070
00071 void insert_row (const RowVector& u, octave_idx_type j);
00072
00073 void delete_row (octave_idx_type j);
00074
00075 void shift_cols (octave_idx_type i, octave_idx_type j);
00076
00077 protected:
00078
00079 void form (octave_idx_type n, Matrix& afact,
00080 double *tau, qr_type_t qr_type);
00081 };
00082
00083 #endif
00084
00085
00086
00087
00088
00089