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