MLPACK  1.0.10
aug_lagrangian.hpp
Go to the documentation of this file.
1 
25 #ifndef __MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP
26 #define __MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP
27 
28 #include <mlpack/core.hpp>
30 
32 
33 namespace mlpack {
34 namespace optimization {
35 
58 template<typename LagrangianFunction>
60 {
61  public:
65 
73  AugLagrangian(LagrangianFunction& function);
74 
84  L_BFGSType& lbfgs);
85 
96  bool Optimize(arma::mat& coordinates,
97  const size_t maxIterations = 1000);
98 
111  bool Optimize(arma::mat& coordinates,
112  const arma::vec& initLambda,
113  const double initSigma,
114  const size_t maxIterations = 1000);
115 
117  const LagrangianFunction& Function() const { return function; }
119  LagrangianFunction& Function() { return function; }
120 
122  const L_BFGSType& LBFGS() const { return lbfgs; }
124  L_BFGSType& LBFGS() { return lbfgs; }
125 
127  const arma::vec& Lambda() const { return augfunc.Lambda(); }
129  arma::vec& Lambda() { return augfunc.Lambda(); }
130 
132  double Sigma() const { return augfunc.Sigma(); }
134  double& Sigma() { return augfunc.Sigma(); }
135 
136  // convert the obkect into a string
137  std::string ToString() const;
138 
139  private:
141  LagrangianFunction& function;
142 
147 
150 
153 };
154 
155 }; // namespace optimization
156 }; // namespace mlpack
157 
158 #include "aug_lagrangian_impl.hpp"
159 
160 #endif // __MLPACK_CORE_OPTIMIZERS_AUG_LAGRANGIAN_AUG_LAGRANGIAN_HPP
161