Mercurial > hg > octave-nkf
annotate liboctave/numeric/CmplxSCHUR.h @ 20215:a3dbb17d4dad
Added tag rc-4-0-0-2 for changeset eba80000fa0d
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 Mar 2015 16:19:47 -0400 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
457 | 1 /* |
2 | |
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17822
diff
changeset
|
3 Copyright (C) 1994-2015 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 | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
457 | 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 | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
457 | 20 |
21 */ | |
22 | |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
23 #if !defined (octave_CmplxSCHUR_h) |
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
24 #define octave_CmplxSCHUR_h 1 |
457 | 25 |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
26 #include <iosfwd> |
1756 | 27 #include <string> |
28 | |
457 | 29 #include "CMatrix.h" |
10822 | 30 #include "dbleSCHUR.h" |
457 | 31 |
1881 | 32 class |
6108 | 33 OCTAVE_API |
1881 | 34 ComplexSCHUR |
457 | 35 { |
36 public: | |
37 | |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
38 ComplexSCHUR (void) : schur_mat (), unitary_mat (), selector (0) { } |
1528 | 39 |
5008 | 40 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
41 bool calc_unitary = true) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
42 : schur_mat (), unitary_mat (), selector (0) |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
43 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
44 init (a, ord, calc_unitary); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
45 } |
457 | 46 |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
47 ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, |
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
48 octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
49 bool calc_unitary = true) |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
50 : schur_mat (), unitary_mat (), selector (0) |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
51 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
52 info = init (a, ord, calc_unitary); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
53 } |
1528 | 54 |
55 ComplexSCHUR (const ComplexSCHUR& a) | |
11498
367bfee35ba0
data member initialization fixes
John W. Eaton <jwe@octave.org>
parents:
10822
diff
changeset
|
56 : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat), selector (0) |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
57 { } |
457 | 58 |
10822 | 59 ComplexSCHUR (const ComplexMatrix& s, const ComplexMatrix& u); |
60 | |
61 ComplexSCHUR (const SCHUR& s); | |
62 | |
1528 | 63 ComplexSCHUR& operator = (const ComplexSCHUR& a) |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
64 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
65 if (this != &a) |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
66 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
67 schur_mat = a.schur_mat; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
68 unitary_mat = a.unitary_mat; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
69 } |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
70 return *this; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
71 } |
457 | 72 |
1929 | 73 ~ComplexSCHUR (void) { } |
74 | |
1881 | 75 ComplexMatrix schur_matrix (void) const { return schur_mat; } |
457 | 76 |
1881 | 77 ComplexMatrix unitary_matrix (void) const { return unitary_mat; } |
457 | 78 |
3504 | 79 friend std::ostream& operator << (std::ostream& os, const ComplexSCHUR& a); |
457 | 80 |
5275 | 81 typedef octave_idx_type (*select_function) (const Complex&); |
1929 | 82 |
457 | 83 private: |
84 | |
85 ComplexMatrix schur_mat; | |
86 ComplexMatrix unitary_mat; | |
1881 | 87 |
1930 | 88 select_function selector; |
89 | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
90 octave_idx_type init (const ComplexMatrix& a, const std::string& ord, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
91 bool calc_unitary); |
457 | 92 }; |
93 | |
94 #endif |