Mercurial > hg > octave-nkf
annotate liboctave/CmplxSVD.h @ 9838:55219e65c7cd
fix typo
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 19 Nov 2009 12:23:52 +0100 |
parents | 16f53d29049f |
children | 4c0cdbe0acca |
rev | line source |
---|---|
457 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2003, 2004, 2005, |
9245 | 4 2006, 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_ComplexSVD_h) | |
25 #define octave_ComplexSVD_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> |
457 | 28 |
29 #include "dDiagMatrix.h" | |
30 #include "CMatrix.h" | |
537 | 31 #include "dbleSVD.h" |
457 | 32 |
1881 | 33 class |
6108 | 34 OCTAVE_API |
1881 | 35 ComplexSVD |
457 | 36 { |
37 public: | |
38 | |
1528 | 39 ComplexSVD (void) { } |
40 | |
1529 | 41 ComplexSVD (const ComplexMatrix& a, SVD::type svd_type = SVD::std) |
1528 | 42 { |
43 init (a, svd_type); | |
44 } | |
45 | |
5275 | 46 ComplexSVD (const ComplexMatrix& a, octave_idx_type& info, |
1529 | 47 SVD::type svd_type = SVD::std) |
1528 | 48 { |
49 info = init (a, svd_type); | |
50 } | |
457 | 51 |
1528 | 52 ComplexSVD (const ComplexSVD& a) |
4374 | 53 : type_computed (a.type_computed), |
54 sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { } | |
457 | 55 |
1528 | 56 ComplexSVD& operator = (const ComplexSVD& a) |
57 { | |
1881 | 58 if (this != &a) |
59 { | |
4374 | 60 type_computed = a.type_computed; |
1881 | 61 sigma = a.sigma; |
62 left_sm = a.left_sm; | |
63 right_sm = a.right_sm; | |
64 } | |
1528 | 65 return *this; |
66 } | |
67 | |
1930 | 68 ~ComplexSVD (void) { } |
69 | |
1528 | 70 DiagMatrix singular_values (void) const { return sigma; } |
71 | |
1544 | 72 ComplexMatrix left_singular_matrix (void) const; |
1528 | 73 |
1544 | 74 ComplexMatrix right_singular_matrix (void) const; |
457 | 75 |
3504 | 76 friend std::ostream& operator << (std::ostream& os, const ComplexSVD& a); |
457 | 77 |
78 private: | |
79 | |
1544 | 80 SVD::type type_computed; |
81 | |
457 | 82 DiagMatrix sigma; |
83 ComplexMatrix left_sm; | |
84 ComplexMatrix right_sm; | |
1881 | 85 |
5275 | 86 octave_idx_type init (const ComplexMatrix& a, SVD::type svd_type = SVD::std); |
457 | 87 }; |
88 | |
89 #endif | |
90 | |
91 /* | |
92 ;;; Local Variables: *** | |
93 ;;; mode: C++ *** | |
94 ;;; End: *** | |
95 */ |