MLPACK  1.0.10
lrsdp.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_HPP
24 #define __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_HPP
25 
26 #include <mlpack/core.hpp>
28 
29 #include "lrsdp_function.hpp"
30 
31 namespace mlpack {
32 namespace optimization {
33 
39 class LRSDP
40 {
41  public:
51  LRSDP(const size_t numConstraints,
52  const arma::mat& initialPoint);
53 
63  LRSDP(const size_t numConstraints,
64  const arma::mat& initialPoint,
65  AugLagrangian<LRSDPFunction>& augLagrangian);
66 
73  double Optimize(arma::mat& coordinates);
74 
76  const arma::mat& C() const { return function.C(); }
78  arma::mat& C() { return function.C(); }
79 
81  const std::vector<arma::mat>& A() const { return function.A(); }
83  std::vector<arma::mat>& A() { return function.A(); }
84 
86  const arma::uvec& AModes() const { return function.AModes(); }
88  arma::uvec& AModes() { return function.AModes(); }
89 
91  const arma::vec& B() const { return function.B(); }
93  arma::vec& B() { return function.B(); }
94 
96  const LRSDPFunction& Function() const { return function; }
98  LRSDPFunction& Function() { return function; }
99 
101  const AugLagrangian<LRSDPFunction>& AugLag() const { return augLag; }
104 
106  std::string ToString() const;
107 
108  private:
110  LRSDPFunction function;
111 
114 };
115 
116 }; // namespace optimization
117 }; // namespace mlpack
118 
119 #endif