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