svd_wrapper.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_METHODS_SVDWRAPPER_HPP
13 #define MLPACK_METHODS_SVDWRAPPER_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack
18 {
19 namespace cf
20 {
21 
27 class DummyClass {};
28 
39 template<class Factorizer = DummyClass>
41 {
42  public:
43  // empty constructor
44  SVDWrapper(const Factorizer& factorizer = Factorizer()) :
45  factorizer(factorizer)
46  {
47  // Nothing to do here.
48  }
49 
61  double Apply(const arma::mat& V,
62  arma::mat& W,
63  arma::mat& sigma,
64  arma::mat& H) const;
76  double Apply(const arma::mat& V,
77  size_t r,
78  arma::mat& W,
79  arma::mat& H) const;
80 
81  private:
83  Factorizer factorizer;
84 }; // class SVDWrapper
85 
88 
89 } // namespace cf
90 } // namespace mlpack
91 
93 #include "svd_wrapper_impl.hpp"
94 
95 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
SVDWrapper(const Factorizer &factorizer=Factorizer())
Definition: svd_wrapper.hpp:44
SVDWrapper< DummyClass > ArmaSVDFactorizer
add simple typedefs
Definition: svd_wrapper.hpp:87
This class acts as a dummy class for passing as template parameter.
Definition: svd_wrapper.hpp:27
This class acts as the wrapper for all SVD factorizers which are incompatible with CF module...
Definition: svd_wrapper.hpp:40