Mercurial > hg > octave-lyh
annotate liboctave/numeric/dbleSCHUR.h @ 17535:c12c688a35ed default tip lyh
Fix warnings
author | LYH <lyh.kernel@gmail.com> |
---|---|
date | Fri, 27 Sep 2013 17:43:27 +0800 |
parents | 648dabbb4c6b |
children |
rev | line source |
---|---|
457 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11586
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_SCHUR_h) | |
24 #define octave_SCHUR_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 "dMatrix.h" |
30 | |
1881 | 31 class |
6108 | 32 OCTAVE_API |
1881 | 33 SCHUR |
457 | 34 { |
35 public: | |
36 | |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
37 SCHUR (void) : schur_mat (), unitary_mat (), selector (0) { } |
1528 | 38 |
5008 | 39 SCHUR (const Matrix& a, const std::string& ord, bool calc_unitary = true) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
40 : schur_mat (), unitary_mat (), selector (0) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
41 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
42 init (a, ord, calc_unitary); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
43 } |
457 | 44 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
45 SCHUR (const Matrix& a, const std::string& ord, int& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
46 bool calc_unitary = true) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
47 : schur_mat (), unitary_mat (), selector (0) |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
48 { |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
49 info = init (a, ord, calc_unitary); |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
50 } |
457 | 51 |
1528 | 52 SCHUR (const SCHUR& a) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
53 : 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
|
54 { } |
457 | 55 |
10822 | 56 SCHUR (const Matrix& s, const Matrix& u); |
57 | |
1528 | 58 SCHUR& operator = (const SCHUR& a) |
59 { | |
1881 | 60 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
61 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
62 schur_mat = a.schur_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
63 unitary_mat = a.unitary_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
64 } |
1528 | 65 return *this; |
66 } | |
67 | |
1929 | 68 ~SCHUR (void) { } |
69 | |
1528 | 70 Matrix schur_matrix (void) const { return schur_mat; } |
71 | |
72 Matrix unitary_matrix (void) const { return unitary_mat; } | |
457 | 73 |
3504 | 74 friend std::ostream& operator << (std::ostream& os, const SCHUR& a); |
457 | 75 |
5275 | 76 typedef octave_idx_type (*select_function) (const double&, const double&); |
1929 | 77 |
457 | 78 private: |
79 | |
80 Matrix schur_mat; | |
81 Matrix unitary_mat; | |
1881 | 82 |
1930 | 83 select_function selector; |
84 | |
5275 | 85 octave_idx_type init (const Matrix& a, const std::string& ord, bool calc_unitary); |
457 | 86 }; |
87 | |
88 #endif |