Mercurial > octave-nkf
comparison liboctave/dbleSVD.h @ 10601:3ce0c530a9c9
implement svd_driver
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 03 May 2010 13:21:35 +0200 |
parents | cbc402e64d83 |
children | 367bfee35ba0 |
comparison
equal
deleted
inserted
replaced
10600:036bdc2d0af0 | 10601:3ce0c530a9c9 |
---|---|
40 std, | 40 std, |
41 economy, | 41 economy, |
42 sigma_only | 42 sigma_only |
43 }; | 43 }; |
44 | 44 |
45 enum driver | |
46 { | |
47 GESVD, | |
48 GESDD | |
49 }; | |
50 | |
45 SVD (void) : sigma (), left_sm (), right_sm () { } | 51 SVD (void) : sigma (), left_sm (), right_sm () { } |
46 | 52 |
47 SVD (const Matrix& a, type svd_type = SVD::std) { init (a, svd_type); } | 53 SVD (const Matrix& a, |
54 type svd_type = SVD::std, driver svd_driver = SVD::GESVD) | |
55 { init (a, svd_type, svd_driver); } | |
48 | 56 |
49 SVD (const Matrix& a, octave_idx_type& info, type svd_type = SVD::std) | 57 SVD (const Matrix& a, octave_idx_type& info, |
58 type svd_type = SVD::std, driver svd_driver = SVD::GESVD) | |
50 { | 59 { |
51 info = init (a, svd_type); | 60 info = init (a, svd_type, svd_driver); |
52 } | 61 } |
53 | 62 |
54 SVD (const SVD& a) | 63 SVD (const SVD& a) |
55 : type_computed (a.type_computed), | 64 : type_computed (a.type_computed), |
56 sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { } | 65 sigma (a.sigma), left_sm (a.left_sm), right_sm (a.right_sm) { } |
84 | 93 |
85 DiagMatrix sigma; | 94 DiagMatrix sigma; |
86 Matrix left_sm; | 95 Matrix left_sm; |
87 Matrix right_sm; | 96 Matrix right_sm; |
88 | 97 |
89 octave_idx_type init (const Matrix& a, type svd_type = std); | 98 octave_idx_type init (const Matrix& a, |
99 type svd_type = std, driver svd_driver = GESVD); | |
90 }; | 100 }; |
91 | 101 |
92 #endif | 102 #endif |