457
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
457
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
457
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_SCHUR_h) |
|
24 #define octave_SCHUR_h 1 |
|
25 |
4192
|
26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) |
1296
|
27 #pragma interface |
|
28 #endif |
|
29 |
3503
|
30 #include <iostream> |
1756
|
31 #include <string> |
|
32 |
457
|
33 #include "dMatrix.h" |
|
34 |
1881
|
35 class |
|
36 SCHUR |
457
|
37 { |
|
38 public: |
|
39 |
1929
|
40 SCHUR (void) |
|
41 : schur_mat (), unitary_mat () { } |
1528
|
42 |
3504
|
43 SCHUR (const Matrix& a, const std::string& ord) |
1929
|
44 : schur_mat (), unitary_mat () |
|
45 { |
|
46 init (a, ord); |
|
47 } |
457
|
48 |
3504
|
49 SCHUR (const Matrix& a, const std::string& ord, int& info) |
1929
|
50 : schur_mat (), unitary_mat () |
|
51 { |
|
52 info = init (a, ord); |
|
53 } |
457
|
54 |
1528
|
55 SCHUR (const SCHUR& a) |
1881
|
56 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457
|
57 |
1528
|
58 SCHUR& operator = (const SCHUR& a) |
|
59 { |
1881
|
60 if (this != &a) |
|
61 { |
|
62 schur_mat = a.schur_mat; |
|
63 unitary_mat = a.unitary_mat; |
|
64 } |
1528
|
65 return *this; |
|
66 } |
|
67 |
1929
|
68 ~SCHUR (void) { } |
|
69 |
1528
|
70 Matrix schur_matrix (void) const { return schur_mat; } |
|
71 |
|
72 Matrix unitary_matrix (void) const { return unitary_mat; } |
457
|
73 |
3504
|
74 friend std::ostream& operator << (std::ostream& os, const SCHUR& a); |
457
|
75 |
1929
|
76 typedef int (*select_function) (const double&, const double&); |
|
77 |
457
|
78 private: |
|
79 |
|
80 Matrix schur_mat; |
|
81 Matrix unitary_mat; |
1881
|
82 |
1930
|
83 select_function selector; |
|
84 |
3504
|
85 int init (const Matrix& a, const std::string& ord); |
457
|
86 }; |
|
87 |
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; End: *** |
|
94 */ |