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 |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
457
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_SCHUR_h) |
|
25 #define octave_SCHUR_h 1 |
|
26 |
3503
|
27 #include <iostream> |
1756
|
28 #include <string> |
|
29 |
457
|
30 #include "dMatrix.h" |
|
31 |
1881
|
32 class |
|
33 SCHUR |
457
|
34 { |
|
35 public: |
|
36 |
1929
|
37 SCHUR (void) |
|
38 : schur_mat (), unitary_mat () { } |
1528
|
39 |
5008
|
40 SCHUR (const Matrix& a, const std::string& ord, bool calc_unitary = true) |
|
41 : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } |
457
|
42 |
5008
|
43 SCHUR (const Matrix& a, const std::string& ord, int& info, |
|
44 bool calc_unitary = true) |
|
45 : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } |
457
|
46 |
1528
|
47 SCHUR (const SCHUR& a) |
1881
|
48 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457
|
49 |
1528
|
50 SCHUR& operator = (const SCHUR& a) |
|
51 { |
1881
|
52 if (this != &a) |
|
53 { |
|
54 schur_mat = a.schur_mat; |
|
55 unitary_mat = a.unitary_mat; |
|
56 } |
1528
|
57 return *this; |
|
58 } |
|
59 |
1929
|
60 ~SCHUR (void) { } |
|
61 |
1528
|
62 Matrix schur_matrix (void) const { return schur_mat; } |
|
63 |
|
64 Matrix unitary_matrix (void) const { return unitary_mat; } |
457
|
65 |
3504
|
66 friend std::ostream& operator << (std::ostream& os, const SCHUR& a); |
457
|
67 |
5275
|
68 typedef octave_idx_type (*select_function) (const double&, const double&); |
1929
|
69 |
457
|
70 private: |
|
71 |
|
72 Matrix schur_mat; |
|
73 Matrix unitary_mat; |
1881
|
74 |
1930
|
75 select_function selector; |
|
76 |
5275
|
77 octave_idx_type init (const Matrix& a, const std::string& ord, bool calc_unitary); |
457
|
78 }; |
|
79 |
|
80 #endif |
|
81 |
|
82 /* |
|
83 ;;; Local Variables: *** |
|
84 ;;; mode: C++ *** |
|
85 ;;; End: *** |
|
86 */ |