457
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, |
|
4 2007 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 |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
457
|
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 |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
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 |
6108
|
33 OCTAVE_API |
1881
|
34 SCHUR |
457
|
35 { |
|
36 public: |
|
37 |
1929
|
38 SCHUR (void) |
|
39 : schur_mat (), unitary_mat () { } |
1528
|
40 |
5008
|
41 SCHUR (const Matrix& a, const std::string& ord, bool calc_unitary = true) |
|
42 : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } |
457
|
43 |
5008
|
44 SCHUR (const Matrix& a, const std::string& ord, int& info, |
|
45 bool calc_unitary = true) |
|
46 : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } |
457
|
47 |
1528
|
48 SCHUR (const SCHUR& a) |
1881
|
49 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat) { } |
457
|
50 |
1528
|
51 SCHUR& operator = (const SCHUR& a) |
|
52 { |
1881
|
53 if (this != &a) |
|
54 { |
|
55 schur_mat = a.schur_mat; |
|
56 unitary_mat = a.unitary_mat; |
|
57 } |
1528
|
58 return *this; |
|
59 } |
|
60 |
1929
|
61 ~SCHUR (void) { } |
|
62 |
1528
|
63 Matrix schur_matrix (void) const { return schur_mat; } |
|
64 |
|
65 Matrix unitary_matrix (void) const { return unitary_mat; } |
457
|
66 |
3504
|
67 friend std::ostream& operator << (std::ostream& os, const SCHUR& a); |
457
|
68 |
5275
|
69 typedef octave_idx_type (*select_function) (const double&, const double&); |
1929
|
70 |
457
|
71 private: |
|
72 |
|
73 Matrix schur_mat; |
|
74 Matrix unitary_mat; |
1881
|
75 |
1930
|
76 select_function selector; |
|
77 |
5275
|
78 octave_idx_type init (const Matrix& a, const std::string& ord, bool calc_unitary); |
457
|
79 }; |
|
80 |
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; End: *** |
|
87 */ |