lrsdp.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_HPP
14 #define MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_HPP
15 
16 #include <mlpack/prereqs.hpp>
18 
19 #include "lrsdp_function.hpp"
20 
21 namespace mlpack {
22 namespace optimization {
23 
29 template <typename SDPType>
30 class LRSDP
31 {
32  public:
44  LRSDP(const size_t numSparseConstraints,
45  const size_t numDenseConstraints,
46  const arma::mat& initialPoint,
47  const size_t maxIterations = 1000);
48 
71  double Optimize(arma::mat& coordinates);
72 
74  const SDPType& SDP() const { return function.SDP(); }
76  SDPType& SDP() { return function.SDP(); }
77 
79  const LRSDPFunction<SDPType>& Function() const { return function; }
81  LRSDPFunction<SDPType>& Function() { return function; }
82 
84  const AugLagrangian& AugLag() const { return augLag; }
86  AugLagrangian& AugLag() { return augLag; }
87 
89  size_t MaxIterations() const { return maxIterations; }
91  size_t& MaxIterations() { return maxIterations; }
92 
93  private:
95  AugLagrangian augLag;
97  LRSDPFunction<SDPType> function;
99  size_t maxIterations;
100 };
101 
102 } // namespace optimization
103 } // namespace mlpack
104 
105 // Include implementation
106 #include "lrsdp_impl.hpp"
107 
108 #endif
.hpp
Definition: add_to_po.hpp:21
double Optimize(arma::mat &coordinates)
Create an LRSDP object with the given SDP problem to be solved, and the given initial point...
LRSDP(const size_t numSparseConstraints, const size_t numDenseConstraints, const arma::mat &initialPoint, const size_t maxIterations=1000)
Create an LRSDP to be optimized.
The objective function that LRSDP is trying to optimize.
The core includes that mlpack expects; standard C++ includes and Armadillo.
LRSDP is the implementation of Monteiro and Burer&#39;s formulation of low-rank semidefinite programs (LR...
Definition: lrsdp.hpp:30
const LRSDPFunction< SDPType > & Function() const
Return the function to be optimized.
Definition: lrsdp.hpp:79
The AugLagrangian class implements the Augmented Lagrangian method of optimization.
const SDPType & SDP() const
Return the SDP that will be solved.
Definition: lrsdp.hpp:74
LRSDPFunction< SDPType > & Function()
Modify the function to be optimized.
Definition: lrsdp.hpp:81
const AugLagrangian & AugLag() const
Return the augmented Lagrangian object.
Definition: lrsdp.hpp:84
SDPType & SDP()
Modify the SDP that will be solved.
Definition: lrsdp.hpp:76
SDP()
Initialize this SDP to an empty state.
size_t MaxIterations() const
Get the maximum number of iterations.
Definition: lrsdp.hpp:89
size_t & MaxIterations()
Modify the maximum number of iterations.
Definition: lrsdp.hpp:91
AugLagrangian & AugLag()
Modify the augmented Lagrangian object.
Definition: lrsdp.hpp:86