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_FloatSVD_h)
00025 #define octave_FloatSVD_h 1
00026
00027 #include <iosfwd>
00028
00029 #include "fDiagMatrix.h"
00030 #include "fMatrix.h"
00031 #include "dbleSVD.h"
00032
00033 class
00034 OCTAVE_API
00035 FloatSVD
00036 {
00037 public:
00038
00039 FloatSVD (void) : sigma (), left_sm (), right_sm () { }
00040
00041 FloatSVD (const FloatMatrix& a, SVD::type svd_type = SVD::std) { init (a, svd_type); }
00042
00043 FloatSVD (const FloatMatrix& a, octave_idx_type& info, SVD::type svd_type = SVD::std)
00044 {
00045 info = init (a, svd_type);
00046 }
00047
00048 FloatSVD (const FloatSVD& a)
00049 : type_computed (a.type_computed),
00050 sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { }
00051
00052 FloatSVD& operator = (const FloatSVD& a)
00053 {
00054 if (this != &a)
00055 {
00056 type_computed = a.type_computed;
00057 sigma = a.sigma;
00058 left_sm = a.left_sm;
00059 right_sm = a.right_sm;
00060 }
00061
00062 return *this;
00063 }
00064
00065 ~FloatSVD (void) { }
00066
00067 FloatDiagMatrix singular_values (void) const { return sigma; }
00068
00069 FloatMatrix left_singular_matrix (void) const;
00070
00071 FloatMatrix right_singular_matrix (void) const;
00072
00073 friend std::ostream& operator << (std::ostream& os, const FloatSVD& a);
00074
00075 private:
00076
00077 SVD::type type_computed;
00078
00079 FloatDiagMatrix sigma;
00080 FloatMatrix left_sm;
00081 FloatMatrix right_sm;
00082
00083 octave_idx_type init (const FloatMatrix& a, SVD::type svd_type = SVD::std);
00084 };
00085
00086 #endif
00087
00088
00089
00090
00091
00092