mlpack  2.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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:
42  LRSDP(const size_t numSparseConstraints,
43  const size_t numDenseConstraints,
44  const arma::mat& initialPoint);
45 
54  LRSDP(const SDPType& sdp,
55  const arma::mat& initialPoint);
56 
63  double Optimize(arma::mat& coordinates);
64 
66  const SDPType& SDP() const { return function.SDP(); }
68  SDPType& SDP() { return function.SDP(); }
69 
71  const LRSDPFunction<SDPType>& Function() const { return function; }
73  LRSDPFunction<SDPType>& Function() { return function; }
74 
76  const AugLagrangian<LRSDPFunction<SDPType>>& AugLag() const { return augLag; }
79 
80  private:
82  LRSDPFunction<SDPType> function;
83 
86 };
87 
88 } // namespace optimization
89 } // namespace mlpack
90 
91 // Include implementation
92 #include "lrsdp_impl.hpp"
93 
94 #endif
double Optimize(arma::mat &coordinates)
Optimize the LRSDP and return the final objective value.
The objective function that LRSDP is trying to optimize.
The core includes that mlpack expects; standard C++ includes and Armadillo.
AugLagrangian< LRSDPFunction< SDPType > > & AugLag()
Modify the augmented Lagrangian object.
Definition: lrsdp.hpp:78
const LRSDPFunction< SDPType > & Function() const
Return the function to be optimized.
Definition: lrsdp.hpp:71
LRSDP is the implementation of Monteiro and Burer&#39;s formulation of low-rank semidefinite programs (LR...
Definition: lrsdp.hpp:30
LRSDP(const size_t numSparseConstraints, const size_t numDenseConstraints, const arma::mat &initialPoint)
Create an LRSDP to be optimized.
The AugLagrangian class implements the Augmented Lagrangian method of optimization.
const AugLagrangian< LRSDPFunction< SDPType > > & AugLag() const
Return the augmented Lagrangian object.
Definition: lrsdp.hpp:76
LRSDPFunction< SDPType > & Function()
Modify the function to be optimized.
Definition: lrsdp.hpp:73
SDPType & SDP()
Modify the SDP that will be solved.
Definition: lrsdp.hpp:68
SDP()
Initialize this SDP to an empty state.
const SDPType & SDP() const
Return the SDP that will be solved.
Definition: lrsdp.hpp:66