Mercurial > hg > octave-lyh
annotate liboctave/CmplxQRP.h @ 11188:4cb1522e4d0f
Use function handle as input to cellfun,
rather than quoted function name or anonymous function wrapper.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 03 Nov 2010 17:20:56 -0700 |
parents | 9ee5a0a1b93d |
children | fd0a3ac60b0e |
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_ComplexQRP_h) | |
25 #define octave_ComplexQRP_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 "CmplxQR.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 ComplexQRP : public ComplexQR |
538 | 36 { |
37 public: | |
38 | |
1928 | 39 ComplexQRP (void) : ComplexQR (), p () { } |
538 | 40 |
9713
7918eb15040c
refactor the QR classes onto a templated base
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
41 ComplexQRP (const ComplexMatrix&, qr_type_t = qr_type_std); |
538 | 42 |
1881 | 43 ComplexQRP (const ComplexQRP& a) : ComplexQR (a), p (a.p) { } |
538 | 44 |
1528 | 45 ComplexQRP& operator = (const ComplexQRP& 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 ComplexQR::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 } |
1528 | 52 return *this; |
53 } | |
54 | |
1928 | 55 ~ComplexQRP (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 ComplexMatrix&, 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 ComplexQRP&); |
538 | 64 |
65 private: | |
66 | |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7017
diff
changeset
|
67 PermMatrix p; |
538 | 68 }; |
69 | |
70 #endif |