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 |
5008
|
43 SCHUR (const Matrix& a, const std::string& ord, bool calc_unitary = true) |
|
44 : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } |
457
|
45 |
5008
|
46 SCHUR (const Matrix& a, const std::string& ord, int& info, |
|
47 bool calc_unitary = true) |
|
48 : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } |
457
|
49 |
1528
|
50 SCHUR (const SCHUR& a) |
1881
|
51 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457
|
52 |
1528
|
53 SCHUR& operator = (const SCHUR& a) |
|
54 { |
1881
|
55 if (this != &a) |
|
56 { |
|
57 schur_mat = a.schur_mat; |
|
58 unitary_mat = a.unitary_mat; |
|
59 } |
1528
|
60 return *this; |
|
61 } |
|
62 |
1929
|
63 ~SCHUR (void) { } |
|
64 |
1528
|
65 Matrix schur_matrix (void) const { return schur_mat; } |
|
66 |
|
67 Matrix unitary_matrix (void) const { return unitary_mat; } |
457
|
68 |
3504
|
69 friend std::ostream& operator << (std::ostream& os, const SCHUR& a); |
457
|
70 |
1929
|
71 typedef int (*select_function) (const double&, const double&); |
|
72 |
457
|
73 private: |
|
74 |
|
75 Matrix schur_mat; |
|
76 Matrix unitary_mat; |
1881
|
77 |
1930
|
78 select_function selector; |
|
79 |
5008
|
80 int init (const Matrix& a, const std::string& ord, bool calc_unitary); |
457
|
81 }; |
|
82 |
|
83 #endif |
|
84 |
|
85 /* |
|
86 ;;; Local Variables: *** |
|
87 ;;; mode: C++ *** |
|
88 ;;; End: *** |
|
89 */ |