457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
1881
|
4 Copyright (C) 1996 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 |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
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 |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
457
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_ComplexSVD_h) |
|
25 #define octave_ComplexSVD_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
457
|
31 class ostream; |
|
32 |
|
33 #include "dDiagMatrix.h" |
|
34 #include "CMatrix.h" |
537
|
35 #include "dbleSVD.h" |
457
|
36 |
1881
|
37 class |
|
38 ComplexSVD |
457
|
39 { |
|
40 public: |
|
41 |
1528
|
42 ComplexSVD (void) { } |
|
43 |
1529
|
44 ComplexSVD (const ComplexMatrix& a, SVD::type svd_type = SVD::std) |
1528
|
45 { |
|
46 init (a, svd_type); |
|
47 } |
|
48 |
1529
|
49 ComplexSVD (const ComplexMatrix& a, int& info, |
|
50 SVD::type svd_type = SVD::std) |
1528
|
51 { |
|
52 info = init (a, svd_type); |
|
53 } |
457
|
54 |
1528
|
55 ComplexSVD (const ComplexSVD& a) |
1881
|
56 : sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { } |
457
|
57 |
1528
|
58 ComplexSVD& operator = (const ComplexSVD& a) |
|
59 { |
1881
|
60 if (this != &a) |
|
61 { |
|
62 sigma = a.sigma; |
|
63 left_sm = a.left_sm; |
|
64 right_sm = a.right_sm; |
|
65 } |
1528
|
66 return *this; |
|
67 } |
|
68 |
|
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 |
|
75 friend ostream& operator << (ostream& os, const ComplexSVD& a); |
|
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 |
|
85 int init (const ComplexMatrix& a, SVD::type svd_type = SVD::std); |
457
|
86 }; |
|
87 |
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; page-delimiter: "^/\\*" *** |
|
94 ;;; End: *** |
|
95 */ |