Mercurial > hg > octave-lyh
annotate liboctave/CmplxSCHUR.h @ 14508:0901f926ed50
maint: correct file name in test/bug-35448/module.mk file
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 28 Mar 2012 23:09:43 -0400 |
parents | 72c96de7a403 |
children |
rev | line source |
---|---|
457 | 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 |
457 | 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. | |
457 | 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/>. | |
457 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_ComplexSCHUR_h) | |
24 #define octave_ComplexSCHUR_h 1 | |
25 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
26 #include <iosfwd> |
1756 | 27 #include <string> |
28 | |
457 | 29 #include "CMatrix.h" |
10822 | 30 #include "dbleSCHUR.h" |
457 | 31 |
1881 | 32 class |
6108 | 33 OCTAVE_API |
1881 | 34 ComplexSCHUR |
457 | 35 { |
36 public: | |
37 | |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
38 ComplexSCHUR (void) : schur_mat (), unitary_mat (), selector (0) { } |
1528 | 39 |
5008 | 40 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
41 bool calc_unitary = true) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
42 : schur_mat (), unitary_mat (), selector (0) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
43 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
44 init (a, ord, calc_unitary); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
45 } |
457 | 46 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
47 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
48 octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
49 bool calc_unitary = true) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
50 : schur_mat (), unitary_mat (), selector (0) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
51 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
52 info = init (a, ord, calc_unitary); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
53 } |
1528 | 54 |
55 ComplexSCHUR (const ComplexSCHUR& a) | |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
56 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat), selector (0) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
57 { } |
457 | 58 |
10822 | 59 ComplexSCHUR (const ComplexMatrix& s, const ComplexMatrix& u); |
60 | |
61 ComplexSCHUR (const SCHUR& s); | |
62 | |
1528 | 63 ComplexSCHUR& operator = (const ComplexSCHUR& a) |
64 { | |
1881 | 65 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
66 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
67 schur_mat = a.schur_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
68 unitary_mat = a.unitary_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
69 } |
1528 | 70 return *this; |
71 } | |
457 | 72 |
1929 | 73 ~ComplexSCHUR (void) { } |
74 | |
1881 | 75 ComplexMatrix schur_matrix (void) const { return schur_mat; } |
457 | 76 |
1881 | 77 ComplexMatrix unitary_matrix (void) const { return unitary_mat; } |
457 | 78 |
3504 | 79 friend std::ostream& operator << (std::ostream& os, const ComplexSCHUR& a); |
457 | 80 |
5275 | 81 typedef octave_idx_type (*select_function) (const Complex&); |
1929 | 82 |
457 | 83 private: |
84 | |
85 ComplexMatrix schur_mat; | |
86 ComplexMatrix unitary_mat; | |
1881 | 87 |
1930 | 88 select_function selector; |
89 | |
5275 | 90 octave_idx_type init (const ComplexMatrix& a, const std::string& ord, bool calc_unitary); |
457 | 91 }; |
92 | |
93 #endif |