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 |
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 |
|
23 #if !defined (octave_ComplexSVD_h) |
|
24 #define octave_ComplexSVD_h 1 |
|
25 |
3503
|
26 #include <iostream> |
457
|
27 |
|
28 #include "dDiagMatrix.h" |
|
29 #include "CMatrix.h" |
537
|
30 #include "dbleSVD.h" |
457
|
31 |
1881
|
32 class |
6108
|
33 OCTAVE_API |
1881
|
34 ComplexSVD |
457
|
35 { |
|
36 public: |
|
37 |
1528
|
38 ComplexSVD (void) { } |
|
39 |
1529
|
40 ComplexSVD (const ComplexMatrix& a, SVD::type svd_type = SVD::std) |
1528
|
41 { |
|
42 init (a, svd_type); |
|
43 } |
|
44 |
5275
|
45 ComplexSVD (const ComplexMatrix& a, octave_idx_type& info, |
1529
|
46 SVD::type svd_type = SVD::std) |
1528
|
47 { |
|
48 info = init (a, svd_type); |
|
49 } |
457
|
50 |
1528
|
51 ComplexSVD (const ComplexSVD& a) |
4374
|
52 : type_computed (a.type_computed), |
|
53 sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { } |
457
|
54 |
1528
|
55 ComplexSVD& operator = (const ComplexSVD& a) |
|
56 { |
1881
|
57 if (this != &a) |
|
58 { |
4374
|
59 type_computed = a.type_computed; |
1881
|
60 sigma = a.sigma; |
|
61 left_sm = a.left_sm; |
|
62 right_sm = a.right_sm; |
|
63 } |
1528
|
64 return *this; |
|
65 } |
|
66 |
1930
|
67 ~ComplexSVD (void) { } |
|
68 |
1528
|
69 DiagMatrix singular_values (void) const { return sigma; } |
|
70 |
1544
|
71 ComplexMatrix left_singular_matrix (void) const; |
1528
|
72 |
1544
|
73 ComplexMatrix right_singular_matrix (void) const; |
457
|
74 |
3504
|
75 friend std::ostream& operator << (std::ostream& os, const ComplexSVD& a); |
457
|
76 |
|
77 private: |
|
78 |
1544
|
79 SVD::type type_computed; |
|
80 |
457
|
81 DiagMatrix sigma; |
|
82 ComplexMatrix left_sm; |
|
83 ComplexMatrix right_sm; |
1881
|
84 |
5275
|
85 octave_idx_type init (const ComplexMatrix& a, SVD::type svd_type = SVD::std); |
457
|
86 }; |
|
87 |
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; End: *** |
|
94 */ |