2 #ifndef vnl_svd_economy_hxx_ 3 #define vnl_svd_economy_hxx_ 11 # include <vcl_msvc_warnings.h> 19 inline void vnl_linpack_svdc_economy(vnl_netlib_svd_proto(T)) \ 20 { v3p_netlib_##p##svdc_(vnl_netlib_svd_params); } 23 macro(c, std::complex<float>);
24 macro(z, std::complex<double>);
27 template <
class real_t>
29 m_(M.rows()), n_(M.columns()),
46 constexpr
long job = 01;
47 vnl_linpack_svdc_economy((real_t*)X, &
m_, &
m_, &
n_,
85 std::cerr << __FILE__
": suspicious return value (" << info <<
") from SVDC\n" 86 << __FILE__
": M is " << M.
rows() <<
'x' << M.
cols() << std::endl;
92 for (
int j = 0; j < mm; ++j)
95 for (
int j = mm; j <
n_; ++j)
100 for (
int j = 0; j <
n_; ++j)
101 for (
int i = 0; i <
n_; ++i)
106 template <
class real_t>
110 return V_.get_column( n_ - 1 );
114 #undef VNL_SVD_ECONOMY_INSTANTIATE 115 #define VNL_SVD_ECONOMY_INSTANTIATE(T) \ 116 template class VNL_ALGO_EXPORT vnl_svd_economy<T > 118 #endif // vnl_svd_economy_hxx_
unsigned int cols() const
Return the number of columns.
void assert_finite() const
abort if matrix contains any INFs or NANs.
Print matrices and vectors in nice MATLAB format.
vnl_vector< singval_t > sv_
vnl_svd_economy(vnl_matrix< real_t > const &M)
T const * data_block() const
Access the contiguous block storing the elements in the vector. O(1).
vnl_vector< real_t > nullvector()
Return the rightmost column of V.
SVD wrapper that doesn't compute the left singular vectors, U.
Convert row-stored matrix to column-stored.
VNL_EXPORT std::ostream & vnl_matlab_print(std::ostream &, T const *array, unsigned length, vnl_matlab_print_format=vnl_matlab_print_format_default)
print a 1D array.
Declare in a central place the list of symbols from netlib.
Convert row-stored matrix to column-stored.
Mathematical vector class, templated by type of element.
vnl_bignum abs(vnl_bignum const &x)
unsigned int rows() const
Return the number of rows.
vnl_decnum min(vnl_decnum const &x, vnl_decnum const &y)