457
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 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_ComplexSCHUR_h) |
|
24 #define octave_ComplexSCHUR_h 1 |
|
25 |
3503
|
26 #include <iostream> |
1756
|
27 #include <string> |
|
28 |
457
|
29 #include "CMatrix.h" |
|
30 |
1881
|
31 class |
6108
|
32 OCTAVE_API |
1881
|
33 ComplexSCHUR |
457
|
34 { |
|
35 public: |
|
36 |
1929
|
37 ComplexSCHUR (void) |
|
38 : schur_mat (), unitary_mat () { } |
1528
|
39 |
5008
|
40 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, |
|
41 bool calc_unitary = true) |
|
42 : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } |
457
|
43 |
5275
|
44 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, octave_idx_type& info, |
5008
|
45 bool calc_unitary = true) |
|
46 : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } |
1528
|
47 |
|
48 ComplexSCHUR (const ComplexSCHUR& a) |
1881
|
49 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457
|
50 |
1528
|
51 ComplexSCHUR& operator = (const ComplexSCHUR& a) |
|
52 { |
1881
|
53 if (this != &a) |
|
54 { |
|
55 schur_mat = a.schur_mat; |
|
56 unitary_mat = a.unitary_mat; |
|
57 } |
1528
|
58 return *this; |
|
59 } |
457
|
60 |
1929
|
61 ~ComplexSCHUR (void) { } |
|
62 |
1881
|
63 ComplexMatrix schur_matrix (void) const { return schur_mat; } |
457
|
64 |
1881
|
65 ComplexMatrix unitary_matrix (void) const { return unitary_mat; } |
457
|
66 |
3504
|
67 friend std::ostream& operator << (std::ostream& os, const ComplexSCHUR& a); |
457
|
68 |
5275
|
69 typedef octave_idx_type (*select_function) (const Complex&); |
1929
|
70 |
457
|
71 private: |
|
72 |
|
73 ComplexMatrix schur_mat; |
|
74 ComplexMatrix unitary_mat; |
1881
|
75 |
1930
|
76 select_function selector; |
|
77 |
5275
|
78 octave_idx_type init (const ComplexMatrix& a, const std::string& ord, bool calc_unitary); |
457
|
79 }; |
|
80 |
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; End: *** |
|
87 */ |