457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
1881
|
4 Copyright (C) 1996 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 |
1756
|
33 #include <string> |
|
34 |
457
|
35 #include "dMatrix.h" |
|
36 |
1881
|
37 class |
|
38 SCHUR |
457
|
39 { |
|
40 public: |
|
41 |
1929
|
42 SCHUR (void) |
|
43 : schur_mat (), unitary_mat () { } |
1528
|
44 |
1929
|
45 SCHUR (const Matrix& a, const string& ord) |
|
46 : schur_mat (), unitary_mat () |
|
47 { |
|
48 init (a, ord); |
|
49 } |
457
|
50 |
1756
|
51 SCHUR (const Matrix& a, const string& ord, int& info) |
1929
|
52 : schur_mat (), unitary_mat () |
|
53 { |
|
54 info = init (a, ord); |
|
55 } |
457
|
56 |
1528
|
57 SCHUR (const SCHUR& a) |
1881
|
58 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457
|
59 |
1528
|
60 SCHUR& operator = (const SCHUR& a) |
|
61 { |
1881
|
62 if (this != &a) |
|
63 { |
|
64 schur_mat = a.schur_mat; |
|
65 unitary_mat = a.unitary_mat; |
|
66 } |
1528
|
67 return *this; |
|
68 } |
|
69 |
1929
|
70 ~SCHUR (void) { } |
|
71 |
1528
|
72 Matrix schur_matrix (void) const { return schur_mat; } |
|
73 |
|
74 Matrix unitary_matrix (void) const { return unitary_mat; } |
457
|
75 |
|
76 friend ostream& operator << (ostream& os, const SCHUR& a); |
|
77 |
1929
|
78 typedef int (*select_function) (const double&, const double&); |
|
79 |
457
|
80 private: |
|
81 |
|
82 Matrix schur_mat; |
|
83 Matrix unitary_mat; |
1881
|
84 |
1930
|
85 select_function selector; |
|
86 |
1881
|
87 int init (const Matrix& a, const string& ord); |
457
|
88 }; |
|
89 |
|
90 #endif |
|
91 |
|
92 /* |
|
93 ;;; Local Variables: *** |
|
94 ;;; mode: C++ *** |
|
95 ;;; page-delimiter: "^/\\*" *** |
|
96 ;;; End: *** |
|
97 */ |