vnl_svd_economy.h
Go to the documentation of this file.
1 // This is core/vnl/algo/vnl_svd_economy.h
2 #ifndef vnl_svd_economy_h_
3 #define vnl_svd_economy_h_
4 //:
5 // \file
6 // \brief SVD wrapper that doesn't compute the left singular vectors, U.
7 // \author David Capel (d.capel@2d3.com)
8 // \date 04 Mar 03
9 //
10 // The cost of SVD of an m*n matrix increases with O(m^2) if computation
11 // of U is required, but only O(m) if not.
12 
13 #include <vnl/vnl_numeric_traits.h>
14 #include <vnl/vnl_vector.h>
15 #include <vnl/vnl_matrix.h>
16 #include <vnl/algo/vnl_algo_export.h>
17 
18 template <class real_t>
20 {
21  public:
22  //: The singular values of a matrix of complex<T> are of type T, not complex<T>
24 
26 
27  //: Return right singular vectors.
28  vnl_matrix<real_t> const& V() const { return V_; }
29  vnl_matrix<real_t> & V() { return V_; }
30 
31  //: Return singular values in decreasing order.
32  vnl_vector<singval_t> const& lambdas() const { return sv_; }
34 
35  //: Return the rightmost column of V.
37 
38  protected:
39  long m_, n_;
42 
43  private:
46 };
47 
48 #endif
vnl_vector< singval_t > sv_
An ordinary mathematical matrix.
Templated zero/one/precision.
vnl_numeric_traits< real_t >::abs_t singval_t
The singular values of a matrix of complex<T> are of type T, not complex<T>.
vnl_svd_economy(vnl_matrix< real_t > const &M)
vnl_svd_economy< real_t > & operator=(vnl_svd_economy< real_t > const &)
vnl_matrix< real_t > & V()
vnl_vector< real_t > nullvector()
Return the rightmost column of V.
vnl_svd_economy(vnl_svd_economy< real_t > const &)
vnl_matrix< real_t > const & V() const
Return right singular vectors.
vnl_vector< singval_t > & lambdas()
vnl_matrix< real_t > V_
vnl_vector< singval_t > const & lambdas() const
Return singular values in decreasing order.