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