Mercurial > octave
diff liboctave/numeric/svd.h @ 29412:9b6bf68ea663
Add additional svd driver GEJSV for accurate SVD (bug #55727).
* liboctave/numeric/svd.h (svd::gesjv): Add new member function.
(svd::Driver): Add enum GEJSV.
* liboctave/numeric/svd.cc (svd::gejsv): Add new member function.
(svd<T>::svd): Call gejsv if it is selected svd driver. Correct a bug about
right singular vector size when input empty matrix.
(gejsv_lwork): Add new class to compute workspace size of gejsv.
* liboctave/numeric/lo-lapack-proto.h: Declare LAPACK functions: GEJSV for
singular value decomposition, and GELQF, ORMLQ, ORMQR for workspace size
query.
* libinterp/corefcn/svd.cc (svd_driver): Add driver GEJSV.
(Fsvd): Document GEJSV. Add a test for GEJSV.
(Fsvd_driver): Document GEJSV. Add driver name "gejsv". Add a test for GEJSV.
author | Eddy Xiao <bewantbe@gmail.com> |
---|---|
date | Wed, 20 Mar 2019 00:58:11 +0800 |
parents | 7854d5752dd2 |
children | 77edffa7fb40 |
line wrap: on
line diff
--- a/liboctave/numeric/svd.h Sun Mar 07 10:55:54 2021 +0100 +++ b/liboctave/numeric/svd.h Wed Mar 20 00:58:11 2019 +0800 @@ -53,7 +53,8 @@ enum class Driver { GESVD, - GESDD + GESDD, + GEJSV }; svd (void) @@ -113,6 +114,14 @@ P *vt, octave_f77_int_type nrow_vt1, std::vector<P>& work, octave_f77_int_type& lwork, octave_f77_int_type *iwork, octave_f77_int_type& info); + + void gejsv (char& joba, char& jobu, char& jobv, char& jobr, char& jobt, + char& jobp, octave_f77_int_type m, octave_f77_int_type n, + P *tmp_data, octave_f77_int_type m1, DM_P *s_vec, P *u, + P *v, octave_f77_int_type nrow_v1, std::vector<P>& work, + octave_f77_int_type& lwork, + std::vector<octave_f77_int_type>& iwork, + octave_f77_int_type& info); }; } }