Mercurial > octave-nkf
annotate liboctave/CmplxHESS.h @ 11498:367bfee35ba0
data member initialization fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 13 Jan 2011 02:37:45 -0500 |
parents | cbc402e64d83 |
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_ComplexHESS_h) | |
25 #define octave_ComplexHESS_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> |
457 | 28 |
29 #include "CMatrix.h" | |
30 | |
1881 | 31 class |
6108 | 32 OCTAVE_API |
1881 | 33 ComplexHESS |
457 | 34 { |
35 public: | |
36 | |
1881 | 37 ComplexHESS (void) : hess_mat (), unitary_hess_mat () { } |
1528 | 38 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
39 ComplexHESS (const ComplexMatrix& a) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
40 : hess_mat (), unitary_hess_mat () |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
41 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
42 init (a); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
43 } |
1528 | 44 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
45 ComplexHESS (const ComplexMatrix& a, octave_idx_type& info) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
46 : hess_mat (), unitary_hess_mat () |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
47 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
48 info = init (a); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
49 } |
1528 | 50 |
51 ComplexHESS (const ComplexHESS& a) | |
1881 | 52 : hess_mat (a.hess_mat), unitary_hess_mat (a.unitary_hess_mat) { } |
1528 | 53 |
54 ComplexHESS& operator = (const ComplexHESS& a) | |
55 { | |
1881 | 56 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
57 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
58 hess_mat = a.hess_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
59 unitary_hess_mat = a.unitary_hess_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
60 } |
1528 | 61 return *this; |
62 } | |
63 | |
1932 | 64 ~ComplexHESS (void) { } |
65 | |
1528 | 66 ComplexMatrix hess_matrix (void) const { return hess_mat; } |
67 | |
68 ComplexMatrix unitary_hess_matrix (void) const | |
69 { | |
70 return unitary_hess_mat; | |
71 } | |
457 | 72 |
3504 | 73 friend std::ostream& operator << (std::ostream& os, const ComplexHESS& a); |
457 | 74 |
75 private: | |
76 | |
77 ComplexMatrix hess_mat; | |
78 ComplexMatrix unitary_hess_mat; | |
1881 | 79 |
5275 | 80 octave_idx_type init (const ComplexMatrix& a); |
457 | 81 }; |
82 | |
83 #endif |