Mercurial > octave-nkf
annotate liboctave/dbleSCHUR.h @ 10843:229675bb7647 ss-3-3-52
version is now 3.3.52
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 01 Aug 2010 11:49:45 -0400 |
parents | 23d2378512a0 |
children | 367bfee35ba0 |
rev | line source |
---|---|
457 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, |
9245 | 4 2007, 2009 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 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
27 #include <iosfwd> |
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, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
45 bool calc_unitary = true) |
5008 | 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 |
10822 | 51 SCHUR (const Matrix& s, const Matrix& u); |
52 | |
1528 | 53 SCHUR& operator = (const SCHUR& a) |
54 { | |
1881 | 55 if (this != &a) |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
56 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
57 schur_mat = a.schur_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
58 unitary_mat = a.unitary_mat; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
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 |
5275 | 71 typedef octave_idx_type (*select_function) (const double&, const double&); |
1929 | 72 |
457 | 73 private: |
74 | |
75 Matrix schur_mat; | |
76 Matrix unitary_mat; | |
1881 | 77 |
1930 | 78 select_function selector; |
79 | |
5275 | 80 octave_idx_type init (const Matrix& a, const std::string& ord, bool calc_unitary); |
457 | 81 }; |
82 | |
83 #endif |