457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993, 1994 John W. Eaton |
|
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 |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
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 |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_ComplexSCHUR_h) |
|
25 #define octave_ComplexSCHUR_h 1 |
|
26 |
|
27 class ostream; |
|
28 |
|
29 #include "CMatrix.h" |
|
30 |
|
31 extern "C++" { |
|
32 |
|
33 class ComplexSCHUR |
|
34 { |
|
35 friend class ComplexMatrix; |
|
36 |
|
37 public: |
|
38 |
|
39 ComplexSCHUR (void) {} |
|
40 |
|
41 ComplexSCHUR (const ComplexMatrix& a, const char *ord); |
|
42 ComplexSCHUR (const ComplexMatrix& a, const char *ord, int& info); |
|
43 |
|
44 ComplexSCHUR (const ComplexSCHUR& a, const char *ord); |
|
45 |
|
46 ComplexSCHUR& operator = (const ComplexSCHUR& a); |
|
47 |
|
48 ComplexMatrix schur_matrix (void) const; |
|
49 ComplexMatrix unitary_matrix (void) const; |
|
50 |
|
51 friend ostream& operator << (ostream& os, const ComplexSCHUR& a); |
|
52 |
|
53 private: |
|
54 |
|
55 int init (const ComplexMatrix& a, const char *ord); |
|
56 |
|
57 ComplexMatrix schur_mat; |
|
58 ComplexMatrix unitary_mat; |
|
59 }; |
|
60 |
|
61 inline ComplexSCHUR::ComplexSCHUR (const ComplexMatrix& a, const char *ord) |
|
62 { |
|
63 init (a,ord); |
|
64 } |
|
65 |
|
66 inline ComplexSCHUR::ComplexSCHUR (const ComplexMatrix& a, const char *ord, |
|
67 int& info) |
|
68 { |
|
69 info = init (a,ord); |
|
70 } |
|
71 |
|
72 inline ComplexSCHUR::ComplexSCHUR (const ComplexSCHUR& a, const char *ord) |
|
73 { |
|
74 schur_mat = a.schur_mat; |
|
75 unitary_mat = a.unitary_mat; |
|
76 } |
|
77 |
|
78 inline ComplexSCHUR& |
|
79 ComplexSCHUR::operator = (const ComplexSCHUR& a) |
|
80 { |
|
81 schur_mat = a.schur_mat; |
|
82 unitary_mat = a.unitary_mat; |
|
83 |
|
84 return *this; |
|
85 } |
|
86 |
|
87 inline ComplexMatrix ComplexSCHUR::schur_matrix (void) const |
|
88 { |
|
89 return schur_mat; |
|
90 } |
|
91 |
|
92 inline ComplexMatrix ComplexSCHUR::unitary_matrix (void) const |
|
93 { |
|
94 return unitary_mat; |
|
95 } |
|
96 |
|
97 } // extern "C++" |
|
98 |
|
99 #endif |
|
100 |
|
101 /* |
|
102 ;;; Local Variables: *** |
|
103 ;;; mode: C++ *** |
|
104 ;;; page-delimiter: "^/\\*" *** |
|
105 ;;; End: *** |
|
106 */ |