Mercurial > hg > octave-lyh
annotate liboctave/CmplxQR.h @ 8019:0ef13e15319b
replace NPOS with std::string::npos
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Aug 2008 15:15:33 -0400 |
parents | efccca5f2ad7 |
children | d66c9b6e506a |
rev | line source |
---|---|
457 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, |
4 2007 John W. Eaton | |
457 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
457 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
457 | 21 |
22 */ | |
23 | |
7554
40574114c514
implement Cholesky factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7553
diff
changeset
|
24 // updating/downdating by Jaroslav Hajek 2008 |
40574114c514
implement Cholesky factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7553
diff
changeset
|
25 |
457 | 26 #if !defined (octave_ComplexQR_h) |
27 #define octave_ComplexQR_h 1 | |
28 | |
3503 | 29 #include <iostream> |
457 | 30 |
31 #include "CMatrix.h" | |
7553
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
32 #include "CColVector.h" |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
33 #include "CRowVector.h" |
539 | 34 #include "dbleQR.h" |
457 | 35 |
7553
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
36 |
1881 | 37 class |
6108 | 38 OCTAVE_API |
1881 | 39 ComplexQR |
457 | 40 { |
41 public: | |
42 | |
1927 | 43 ComplexQR (void) : q (), r () { } |
457 | 44 |
2763 | 45 ComplexQR (const ComplexMatrix&, QR::type = QR::std); |
457 | 46 |
7553
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
47 ComplexQR (const ComplexMatrix& q, const ComplexMatrix& r); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
48 |
1881 | 49 ComplexQR (const ComplexQR& a) : q (a.q), r (a.r) { } |
457 | 50 |
1528 | 51 ComplexQR& operator = (const ComplexQR& a) |
52 { | |
1881 | 53 if (this != &a) |
54 { | |
55 q = a.q; | |
56 r = a.r; | |
57 } | |
1528 | 58 return *this; |
59 } | |
60 | |
1927 | 61 ~ComplexQR (void) { } |
1921 | 62 |
2763 | 63 void init (const ComplexMatrix&, QR::type = QR::std); |
64 | |
1528 | 65 ComplexMatrix Q (void) const { return q; } |
2763 | 66 |
1528 | 67 ComplexMatrix R (void) const { return r; } |
457 | 68 |
7553
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
69 void update (const ComplexMatrix& u, const ComplexMatrix& v); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
70 |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
71 void insert_col (const ComplexMatrix& u, octave_idx_type j); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
72 |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
73 void delete_col (octave_idx_type j); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
74 |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
75 void insert_row (const ComplexMatrix& u, octave_idx_type j); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
76 |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
77 void delete_row (octave_idx_type j); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
78 |
7700
efccca5f2ad7
more QR & Cholesky updating functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7554
diff
changeset
|
79 void shift_cols (octave_idx_type i, octave_idx_type j); |
efccca5f2ad7
more QR & Cholesky updating functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7554
diff
changeset
|
80 |
7553
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
81 void economize(); |
56be6f31dd4e
implementation of QR factorization updating
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
82 |
3504 | 83 friend std::ostream& operator << (std::ostream&, const ComplexQR&); |
457 | 84 |
539 | 85 protected: |
457 | 86 |
87 ComplexMatrix q; | |
88 ComplexMatrix r; | |
89 }; | |
90 | |
91 #endif | |
92 | |
93 /* | |
94 ;;; Local Variables: *** | |
95 ;;; mode: C++ *** | |
96 ;;; End: *** | |
97 */ |