Mercurial > hg > octave-nkf
annotate liboctave/numeric/CmplxHESS.h @ 16583:e74ef19d2268
use octave_idx_type instead of int
* ls-mat-ascii.cc (looks_like_mat_ascii_file): USe octave_idx_type
instead of int for temporary variables.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 28 Apr 2013 23:21:43 -0400 |
parents | 648dabbb4c6b |
children | d63878346099 |
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_ComplexHESS_h) | |
24 #define octave_ComplexHESS_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> |
457 | 27 |
28 #include "CMatrix.h" | |
29 | |
1881 | 30 class |
6108 | 31 OCTAVE_API |
1881 | 32 ComplexHESS |
457 | 33 { |
34 public: | |
35 | |
1881 | 36 ComplexHESS (void) : hess_mat (), unitary_hess_mat () { } |
1528 | 37 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
38 ComplexHESS (const ComplexMatrix& a) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
39 : hess_mat (), unitary_hess_mat () |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
40 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
41 init (a); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
42 } |
1528 | 43 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
44 ComplexHESS (const ComplexMatrix& a, octave_idx_type& info) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
45 : hess_mat (), unitary_hess_mat () |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
46 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
47 info = init (a); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
48 } |
1528 | 49 |
50 ComplexHESS (const ComplexHESS& a) | |
1881 | 51 : hess_mat (a.hess_mat), unitary_hess_mat (a.unitary_hess_mat) { } |
1528 | 52 |
53 ComplexHESS& operator = (const ComplexHESS& a) | |
54 { | |
1881 | 55 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
56 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
57 hess_mat = a.hess_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
58 unitary_hess_mat = a.unitary_hess_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
59 } |
1528 | 60 return *this; |
61 } | |
62 | |
1932 | 63 ~ComplexHESS (void) { } |
64 | |
1528 | 65 ComplexMatrix hess_matrix (void) const { return hess_mat; } |
66 | |
67 ComplexMatrix unitary_hess_matrix (void) const | |
68 { | |
69 return unitary_hess_mat; | |
70 } | |
457 | 71 |
3504 | 72 friend std::ostream& operator << (std::ostream& os, const ComplexHESS& a); |
457 | 73 |
74 private: | |
75 | |
76 ComplexMatrix hess_mat; | |
77 ComplexMatrix unitary_hess_mat; | |
1881 | 78 |
5275 | 79 octave_idx_type init (const ComplexMatrix& a); |
457 | 80 }; |
81 | |
82 #endif |