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 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029
00030 #include <iostream>
00031
00032 #include "dDiagMatrix.h"
00033 #include "CMatrix.h"
00034 #include "dbleSVD.h"
00035
00036 class
00037 ComplexSVD
00038 {
00039 public:
00040
00041 ComplexSVD (void) { }
00042
00043 ComplexSVD (const ComplexMatrix& a, SVD::type svd_type = SVD::std)
00044 {
00045 init (a, svd_type);
00046 }
00047
00048 ComplexSVD (const ComplexMatrix& a, int& info,
00049 SVD::type svd_type = SVD::std)
00050 {
00051 info = init (a, svd_type);
00052 }
00053
00054 ComplexSVD (const ComplexSVD& a)
00055 : type_computed (a.type_computed),
00056 sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { }
00057
00058 ComplexSVD& operator = (const ComplexSVD& a)
00059 {
00060 if (this != &a)
00061 {
00062 type_computed = a.type_computed;
00063 sigma = a.sigma;
00064 left_sm = a.left_sm;
00065 right_sm = a.right_sm;
00066 }
00067 return *this;
00068 }
00069
00070 ~ComplexSVD (void) { }
00071
00072 DiagMatrix singular_values (void) const { return sigma; }
00073
00074 ComplexMatrix left_singular_matrix (void) const;
00075
00076 ComplexMatrix right_singular_matrix (void) const;
00077
00078 friend std::ostream& operator << (std::ostream& os, const ComplexSVD& a);
00079
00080 private:
00081
00082 SVD::type type_computed;
00083
00084 DiagMatrix sigma;
00085 ComplexMatrix left_sm;
00086 ComplexMatrix right_sm;
00087
00088 int init (const ComplexMatrix& a, SVD::type svd_type = SVD::std);
00089 };
00090
00091 #endif
00092
00093
00094
00095
00096
00097