mlpack  1.0.12
lrsdp.hpp
Go to the documentation of this file.
1 
15 #ifndef __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_HPP
16 #define __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_HPP
17 
18 #include <mlpack/core.hpp>
20 
21 #include "lrsdp_function.hpp"
22 
23 namespace mlpack {
24 namespace optimization {
25 
31 class LRSDP
32 {
33  public:
43  LRSDP(const size_t numConstraints,
44  const arma::mat& initialPoint);
45 
55  LRSDP(const size_t numConstraints,
56  const arma::mat& initialPoint,
57  AugLagrangian<LRSDPFunction>& augLagrangian);
58 
65  double Optimize(arma::mat& coordinates);
66 
68  const arma::mat& C() const { return function.C(); }
70  arma::mat& C() { return function.C(); }
71 
73  const std::vector<arma::mat>& A() const { return function.A(); }
75  std::vector<arma::mat>& A() { return function.A(); }
76 
78  const arma::uvec& AModes() const { return function.AModes(); }
80  arma::uvec& AModes() { return function.AModes(); }
81 
83  const arma::vec& B() const { return function.B(); }
85  arma::vec& B() { return function.B(); }
86 
88  const LRSDPFunction& Function() const { return function; }
90  LRSDPFunction& Function() { return function; }
91 
93  const AugLagrangian<LRSDPFunction>& AugLag() const { return augLag; }
96 
98  std::string ToString() const;
99 
100  private:
102  LRSDPFunction function;
103 
106 };
107 
108 }; // namespace optimization
109 }; // namespace mlpack
110 
111 #endif
arma::vec & B()
Modify the vector of B values.
Definition: lrsdp.hpp:85
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23
The objective function that LRSDP is trying to optimize.
const AugLagrangian< LRSDPFunction > & AugLag() const
Return the augmented Lagrangian object.
Definition: lrsdp.hpp:93
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:31
const std::vector< arma::mat > & A() const
Return the vector of A matrices (which correspond to the constraints).
Definition: lrsdp.hpp:73
arma::uvec & AModes()
Modify the vector of modes for the A matrices.
Definition: lrsdp.hpp:80
The AugLagrangian class implements the Augmented Lagrangian method of optimization.
const LRSDPFunction & Function() const
Return the function to be optimized.
Definition: lrsdp.hpp:88
AugLagrangian< LRSDPFunction > augLag
The AugLagrangian object which will be used for optimization.
Definition: lrsdp.hpp:105
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:78
std::vector< arma::mat > & A()
Modify the veector of A matrices (which correspond to the constraints).
Definition: lrsdp.hpp:75
const arma::mat & C() const
Return the objective function matrix (C).
Definition: lrsdp.hpp:68
AugLagrangian< LRSDPFunction > & AugLag()
Modify the augmented Lagrangian object.
Definition: lrsdp.hpp:95
LRSDPFunction & Function()
Modify the function to be optimized.
Definition: lrsdp.hpp:90
const arma::vec & B() const
Return the vector of B values.
Definition: lrsdp.hpp:83
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:70