Mercurial > hg > octave-nkf
annotate liboctave/numeric/dbleQRP.h @ 17296:3a9efb68272d ss-3-7-6
snapshot 3.7.6
* configure.ac (OCTAVE_VERSION): Bump to 3.7.6.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Aug 2013 15:17:54 -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_QRP_h) | |
24 #define octave_QRP_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 "dbleQR.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 QRP : public QR |
538 | 35 { |
36 public: | |
37 | |
1928 | 38 QRP (void) : QR (), p () { } |
538 | 39 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
40 QRP (const Matrix&, qr_type_t = qr_type_std); |
538 | 41 |
1881 | 42 QRP (const QRP& a) : QR (a), p (a.p) { } |
538 | 43 |
1528 | 44 QRP& operator = (const QRP& 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 QR::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 } |
538 | 51 |
1528 | 52 return *this; |
53 } | |
54 | |
1928 | 55 ~QRP (void) { } |
1922 | 56 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
57 void init (const Matrix&, qr_type_t = qr_type_std); |
2763 | 58 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
59 PermMatrix P (void) const { return p; } |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
60 |
10905
9ee5a0a1b93d
Return permutation vector from QR as a row, not column, vector.
Rik <octave@nomad.inbox5.com>
parents:
10312
diff
changeset
|
61 RowVector Pvec (void) const; |
538 | 62 |
3504 | 63 friend std::ostream& operator << (std::ostream&, const QRP&); |
538 | 64 |
1922 | 65 protected: |
538 | 66 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
67 PermMatrix p; |
538 | 68 }; |
69 | |
70 #endif |