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