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_SCHUR_h) |
|
25 #define octave_SCHUR_h 1 |
|
26 |
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
|
31 class ostream; |
|
32 |
|
33 #include "dMatrix.h" |
|
34 |
|
35 extern "C++" { |
|
36 |
|
37 class SCHUR |
|
38 { |
|
39 friend class Matrix; |
|
40 |
|
41 public: |
|
42 |
|
43 SCHUR (void) {} |
|
44 |
|
45 SCHUR (const Matrix& a, const char *ord); |
|
46 SCHUR (const Matrix& a, const char *ord, int& info); |
|
47 |
|
48 SCHUR (const SCHUR& a, const char *ord); |
|
49 |
|
50 SCHUR& operator = (const SCHUR& a); |
|
51 |
|
52 Matrix schur_matrix (void) const; |
|
53 Matrix unitary_matrix (void) const; |
|
54 |
|
55 friend ostream& operator << (ostream& os, const SCHUR& a); |
|
56 |
|
57 private: |
|
58 |
|
59 int init (const Matrix& a, const char *ord); |
|
60 |
|
61 Matrix schur_mat; |
|
62 Matrix unitary_mat; |
|
63 }; |
|
64 |
|
65 inline SCHUR::SCHUR (const Matrix& a, const char *ord) |
|
66 { |
|
67 init (a, ord); |
|
68 } |
|
69 |
|
70 inline SCHUR::SCHUR (const Matrix& a, const char *ord, int& info) |
|
71 { |
|
72 info = init (a, ord); |
|
73 } |
|
74 |
|
75 inline SCHUR::SCHUR (const SCHUR& a, const char *ord) |
|
76 { |
|
77 schur_mat = a.schur_mat; |
|
78 unitary_mat = a.unitary_mat; |
|
79 } |
|
80 |
|
81 inline SCHUR& |
|
82 SCHUR::operator = (const SCHUR& a) |
|
83 { |
|
84 schur_mat = a.schur_mat; |
|
85 unitary_mat = a.unitary_mat; |
|
86 |
|
87 return *this; |
|
88 } |
|
89 |
|
90 inline Matrix SCHUR::schur_matrix (void) const |
|
91 { |
|
92 return schur_mat; |
|
93 } |
|
94 |
|
95 inline Matrix SCHUR::unitary_matrix (void) const |
|
96 { |
|
97 return unitary_mat; |
|
98 } |
|
99 |
|
100 } // extern "C++" |
|
101 |
|
102 #endif |
|
103 |
|
104 /* |
|
105 ;;; Local Variables: *** |
|
106 ;;; mode: C++ *** |
|
107 ;;; page-delimiter: "^/\\*" *** |
|
108 ;;; End: *** |
|
109 */ |