Mercurial > octave-nkf
annotate liboctave/CmplxSCHUR.h @ 11117:3cbc0d77db48 ss-3-3-53
update version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Oct 2010 02:25:32 -0400 |
parents | 23d2378512a0 |
children | 367bfee35ba0 |
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 | |
1929 | 39 ComplexSCHUR (void) |
40 : schur_mat (), unitary_mat () { } | |
1528 | 41 |
5008 | 42 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
43 bool calc_unitary = true) |
5008 | 44 : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } |
457 | 45 |
5275 | 46 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
47 bool calc_unitary = true) |
5008 | 48 : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } |
1528 | 49 |
50 ComplexSCHUR (const ComplexSCHUR& a) | |
1881 | 51 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457 | 52 |
10822 | 53 ComplexSCHUR (const ComplexMatrix& s, const ComplexMatrix& u); |
54 | |
55 ComplexSCHUR (const SCHUR& s); | |
56 | |
1528 | 57 ComplexSCHUR& operator = (const ComplexSCHUR& a) |
58 { | |
1881 | 59 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
60 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
61 schur_mat = a.schur_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
62 unitary_mat = a.unitary_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
63 } |
1528 | 64 return *this; |
65 } | |
457 | 66 |
1929 | 67 ~ComplexSCHUR (void) { } |
68 | |
1881 | 69 ComplexMatrix schur_matrix (void) const { return schur_mat; } |
457 | 70 |
1881 | 71 ComplexMatrix unitary_matrix (void) const { return unitary_mat; } |
457 | 72 |
3504 | 73 friend std::ostream& operator << (std::ostream& os, const ComplexSCHUR& a); |
457 | 74 |
5275 | 75 typedef octave_idx_type (*select_function) (const Complex&); |
1929 | 76 |
457 | 77 private: |
78 | |
79 ComplexMatrix schur_mat; | |
80 ComplexMatrix unitary_mat; | |
1881 | 81 |
1930 | 82 select_function selector; |
83 | |
5275 | 84 octave_idx_type init (const ComplexMatrix& a, const std::string& ord, bool calc_unitary); |
457 | 85 }; |
86 | |
87 #endif |