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