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
arma::vec & B()
Modify the vector of B values.
Definition: lrsdp.hpp:93
The objective function that LRSDP is trying to optimize.
const AugLagrangian< LRSDPFunction > & AugLag() const
Return the augmented Lagrangian object.
Definition: lrsdp.hpp:101
std::string ToString() const
Return a string representation of the object.
LRSDP is the implementation of Monteiro and Burer's formulation of low-rank semidefinite programs (LR...
Definition: lrsdp.hpp:39
const std::vector< arma::mat > & A() const
Return the vector of A matrices (which correspond to the constraints).
Definition: lrsdp.hpp:81
arma::uvec & AModes()
Modify the vector of modes for the A matrices.
Definition: lrsdp.hpp:88
The AugLagrangian class implements the Augmented Lagrangian method of optimization.
const LRSDPFunction & Function() const
Return the function to be optimized.
Definition: lrsdp.hpp:96
AugLagrangian< LRSDPFunction > augLag
The AugLagrangian object which will be used for optimization.
Definition: lrsdp.hpp:113
LRSDP(const size_t numConstraints, const arma::mat &initialPoint)
Create an LRSDP to be optimized.
const arma::uvec & AModes() const
Return the vector of modes for the A matrices.
Definition: lrsdp.hpp:86
std::vector< arma::mat > & A()
Modify the veector of A matrices (which correspond to the constraints).
Definition: lrsdp.hpp:83
const arma::mat & C() const
Return the objective function matrix (C).
Definition: lrsdp.hpp:76
AugLagrangian< LRSDPFunction > & AugLag()
Modify the augmented Lagrangian object.
Definition: lrsdp.hpp:103
LRSDPFunction & Function()
Modify the function to be optimized.
Definition: lrsdp.hpp:98
const arma::vec & B() const
Return the vector of B values.
Definition: lrsdp.hpp:91
double Optimize(arma::mat &coordinates)
Optimize the LRSDP and return the final objective value.
arma::mat & C()
Modify the objective function matrix (C).
Definition: lrsdp.hpp:78