Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_ComplexSVD_h)
00024 #define octave_ComplexSVD_h 1
00025
00026 #include <iosfwd>
00027
00028 #include "dDiagMatrix.h"
00029 #include "CMatrix.h"
00030 #include "dbleSVD.h"
00031
00032 class
00033 OCTAVE_API
00034 ComplexSVD
00035 {
00036 public:
00037
00038 ComplexSVD (void)
00039 : type_computed (), sigma (), left_sm (), right_sm ()
00040 { }
00041
00042 ComplexSVD (const ComplexMatrix& a, SVD::type svd_type = SVD::std,
00043 SVD::driver svd_driver = SVD::GESVD)
00044 : type_computed (), sigma (), left_sm (), right_sm ()
00045 {
00046 init (a, svd_type, svd_driver);
00047 }
00048
00049 ComplexSVD (const ComplexMatrix& a, octave_idx_type& info,
00050 SVD::type svd_type = SVD::std,
00051 SVD::driver svd_driver = SVD::GESVD)
00052 : type_computed (), sigma (), left_sm (), right_sm ()
00053 {
00054 info = init (a, svd_type, svd_driver);
00055 }
00056
00057 ComplexSVD (const ComplexSVD& a)
00058 : type_computed (a.type_computed), sigma (a.sigma),
00059 left_sm (a.left_sm), right_sm (a.right_sm)
00060 { }
00061
00062 ComplexSVD& operator = (const ComplexSVD& a)
00063 {
00064 if (this != &a)
00065 {
00066 type_computed = a.type_computed;
00067 sigma = a.sigma;
00068 left_sm = a.left_sm;
00069 right_sm = a.right_sm;
00070 }
00071 return *this;
00072 }
00073
00074 ~ComplexSVD (void) { }
00075
00076 DiagMatrix singular_values (void) const { return sigma; }
00077
00078 ComplexMatrix left_singular_matrix (void) const;
00079
00080 ComplexMatrix right_singular_matrix (void) const;
00081
00082 friend std::ostream& operator << (std::ostream& os, const ComplexSVD& a);
00083
00084 private:
00085
00086 SVD::type type_computed;
00087
00088 DiagMatrix sigma;
00089 ComplexMatrix left_sm;
00090 ComplexMatrix right_sm;
00091
00092 octave_idx_type init (const ComplexMatrix& a,
00093 SVD::type svd_type = SVD::std,
00094 SVD::driver svd_driver = SVD::GESVD);
00095 };
00096
00097 #endif