mlpack  master
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 
58  double Apply(const arma::mat& V,
59  arma::mat& W,
60  arma::mat& sigma,
61  arma::mat& H) const;
72  double Apply(const arma::mat& V,
73  size_t r,
74  arma::mat& W,
75  arma::mat& H) const;
76 
77  private:
79  Factorizer factorizer;
80 }; // class SVDWrapper
81 
84 
86 #include "svd_wrapper_impl.hpp"
87 
88 } // namespace cf
89 } // namespace mlpack
90 
91 #endif
SVDWrapper< DummyClass > ArmaSVDFactorizer
add simple typedefs
Definition: svd_wrapper.hpp:83
SVDWrapper(const Factorizer &factorizer=Factorizer())
Definition: svd_wrapper.hpp:44
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
The core includes that mlpack expects; standard C++ includes and Armadillo.
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
Factorizer factorizer
svd factorizer
Definition: svd_wrapper.hpp:79