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