Mercurial > hg > octave-nkf
annotate liboctave/dbleQRP.h @ 10396:a0b51ac0f88a
optimize accumdim with summation
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 05 Mar 2010 12:31:30 +0100 |
parents | cbc402e64d83 |
children | 9ee5a0a1b93d |
rev | line source |
---|---|
538 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, |
8920 | 4 2007, 2008 John W. Eaton |
538 | 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. | |
538 | 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/>. | |
538 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_QRP_h) | |
25 #define octave_QRP_h 1 | |
26 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
27 #include <iosfwd> |
538 | 28 |
29 #include "dbleQR.h" | |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
30 #include "PermMatrix.h" |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
31 #include "dColVector.h" |
538 | 32 |
1881 | 33 class |
6108 | 34 OCTAVE_API |
1881 | 35 QRP : public QR |
538 | 36 { |
37 public: | |
38 | |
1928 | 39 QRP (void) : QR (), p () { } |
538 | 40 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
41 QRP (const Matrix&, qr_type_t = qr_type_std); |
538 | 42 |
1881 | 43 QRP (const QRP& a) : QR (a), p (a.p) { } |
538 | 44 |
1528 | 45 QRP& operator = (const QRP& a) |
46 { | |
1881 | 47 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
48 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
49 QR::operator = (a); |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
50 p = a.p; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
51 } |
538 | 52 |
1528 | 53 return *this; |
54 } | |
55 | |
1928 | 56 ~QRP (void) { } |
1922 | 57 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
58 void init (const Matrix&, qr_type_t = qr_type_std); |
2763 | 59 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
60 PermMatrix P (void) const { return p; } |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
61 |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
62 ColumnVector Pvec (void) const; |
538 | 63 |
3504 | 64 friend std::ostream& operator << (std::ostream&, const QRP&); |
538 | 65 |
1922 | 66 protected: |
538 | 67 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
68 PermMatrix p; |
538 | 69 }; |
70 | |
71 #endif |