24 #if ! defined (octave_svd_h) 25 #define octave_svd_h 1 27 #include "octave-config.h" 41 typedef typename T::real_diag_matrix_type
DM_T;
57 : m_type (), m_driver (), left_sm (), sigma (), right_sm ()
64 : m_type (
a.m_type), m_driver (
a.m_driver), left_sm (
a.left_sm),
65 sigma (
a.sigma), right_sm (
a.right_sm)
75 right_sm =
a.right_sm;
76 m_driver =
a.m_driver;
82 ~
svd (
void) =
default;
84 T left_singular_matrix (
void)
const;
88 T right_singular_matrix (
void)
const;
92 typedef typename T::element_type
P;
93 typedef typename DM_T::element_type
DM_P;
102 void gesvd (
char& jobu,
char& jobv, octave_f77_int_type m,
103 octave_f77_int_type n,
P *tmp_data, octave_f77_int_type m1,
104 DM_P *s_vec,
P *
u,
P *vt, octave_f77_int_type nrow_vt1,
105 std::vector<P>& work, octave_f77_int_type& lwork,
106 octave_f77_int_type& info);
108 void gesdd (
char& jobz, octave_f77_int_type m, octave_f77_int_type n,
109 P *tmp_data, octave_f77_int_type m1,
DM_P *s_vec,
P *
u,
110 P *vt, octave_f77_int_type nrow_vt1, std::vector<P>& work,
111 octave_f77_int_type& lwork, octave_f77_int_type *iwork,
112 octave_f77_int_type& info);
DM_T singular_values(void) const
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
T::real_diag_matrix_type DM_T