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