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