Mercurial > hg > octave-nkf
annotate liboctave/numeric/CmplxQRP.h @ 16660:cbb1bb7a5c3d
Added tag ss-3-7-5 for changeset 608e307b4914
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 14 May 2013 05:23:53 -0400 |
parents | 648dabbb4c6b |
children | d63878346099 |
rev | line source |
---|---|
538 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
3 Copyright (C) 1994-2012 John W. Eaton |
538 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
538 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
538 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_ComplexQRP_h) | |
24 #define octave_ComplexQRP_h 1 | |
25 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
26 #include <iosfwd> |
538 | 27 |
28 #include "CmplxQR.h" | |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
29 #include "PermMatrix.h" |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
30 #include "dColVector.h" |
538 | 31 |
1881 | 32 class |
6108 | 33 OCTAVE_API |
1881 | 34 ComplexQRP : public ComplexQR |
538 | 35 { |
36 public: | |
37 | |
1928 | 38 ComplexQRP (void) : ComplexQR (), p () { } |
538 | 39 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
40 ComplexQRP (const ComplexMatrix&, qr_type_t = qr_type_std); |
538 | 41 |
1881 | 42 ComplexQRP (const ComplexQRP& a) : ComplexQR (a), p (a.p) { } |
538 | 43 |
1528 | 44 ComplexQRP& operator = (const ComplexQRP& a) |
45 { | |
1881 | 46 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
47 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
48 ComplexQR::operator = (a); |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
49 p = a.p; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
50 } |
1528 | 51 return *this; |
52 } | |
53 | |
1928 | 54 ~ComplexQRP (void) { } |
1922 | 55 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
56 void init (const ComplexMatrix&, qr_type_t = qr_type_std); |
2763 | 57 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
58 PermMatrix P (void) const { return p; } |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
59 |
10905
9ee5a0a1b93d
Return permutation vector from QR as a row, not column, vector.
Rik <octave@nomad.inbox5.com>
parents:
10312
diff
changeset
|
60 RowVector Pvec (void) const; |
538 | 61 |
3504 | 62 friend std::ostream& operator << (std::ostream&, const ComplexQRP&); |
538 | 63 |
64 private: | |
65 | |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
66 PermMatrix p; |
538 | 67 }; |
68 | |
69 #endif |