comparison liboctave/dbleSVD.h @ 537:4ecbfd3c3710

[project @ 1994-07-21 22:30:34 by jwe]
author jwe
date Thu, 21 Jul 1994 22:30:47 +0000
parents 3d4b4f0fa5ba
children 714fd17fca28
comparison
equal deleted inserted replaced
536:83b0e891100c 537:4ecbfd3c3710
39 { 39 {
40 friend class Matrix; 40 friend class Matrix;
41 41
42 public: 42 public:
43 43
44 enum type
45 {
46 std,
47 economy,
48 };
49
44 SVD (void) {} 50 SVD (void) {}
45 51
46 SVD (const Matrix& a); 52 SVD (const Matrix& a, SVD::type svd_type = SVD::std);
47 SVD (const Matrix& a, int& info); 53 SVD (const Matrix& a, int& info, SVD::type svd_type = SVD::std);
48 54
49 SVD (const SVD& a); 55 SVD (const SVD& a);
50 56
51 SVD& operator = (const SVD& a); 57 SVD& operator = (const SVD& a);
52 58
56 62
57 friend ostream& operator << (ostream& os, const SVD& a); 63 friend ostream& operator << (ostream& os, const SVD& a);
58 64
59 private: 65 private:
60 66
61 int init (const Matrix& a); 67 int init (const Matrix& a, SVD::type svd_type = SVD::std);
62 68
63 DiagMatrix sigma; 69 DiagMatrix sigma;
64 Matrix left_sm; 70 Matrix left_sm;
65 Matrix right_sm; 71 Matrix right_sm;
66 }; 72 };
67 73
68 inline SVD::SVD (const Matrix& a) 74 inline SVD::SVD (const Matrix& a, SVD::type svd_type)
69 { 75 {
70 init (a); 76 init (a, svd_type);
71 } 77 }
72 78
73 inline SVD::SVD (const Matrix& a, int& info) 79 inline SVD::SVD (const Matrix& a, int& info, SVD::type svd_type)
74 { 80 {
75 info = init (a); 81 info = init (a, svd_type);
76 } 82 }
77 83
78 inline SVD::SVD (const SVD& a) 84 inline SVD::SVD (const SVD& a)
79 { 85 {
80 sigma = a.sigma; 86 sigma = a.sigma;