23 #ifndef __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_FUNCTION_HPP 24 #define __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_FUNCTION_HPP 30 namespace optimization {
50 double Evaluate(
const arma::mat& coordinates)
const;
56 void Gradient(
const arma::mat& coordinates, arma::mat& gradient)
const;
62 const arma::mat& coordinates)
const;
68 const arma::mat& coordinates,
69 arma::mat& gradient)
const;
78 const arma::mat&
C()
const {
return c; }
80 arma::mat&
C() {
return c; }
83 const std::vector<arma::mat>&
A()
const {
return a; }
85 std::vector<arma::mat>&
A() {
return a; }
93 const arma::vec&
B()
const {
return b; }
95 arma::vec&
B() {
return b; }
104 std::vector<arma::mat>
a;
117 const arma::mat& coordinates)
const;
121 const arma::mat& coordinates,
122 arma::mat& gradient)
const;
127 #endif // __MLPACK_CORE_OPTIMIZERS_LRSDP_LRSDP_FUNCTION_HPP double Evaluate(const arma::mat &coordinates) const
Evaluate the objective function of the Augmented Lagrangian function, which is the standard Lagrangia...
arma::mat initialPoint
Initial point.
Linear algebra utility functions, generally performed on matrices or vectors.
arma::mat c
Objective function matrix c.
The objective function that LRSDP is trying to optimize.
const arma::mat & C() const
Return the objective function matrix (C).
arma::mat & C()
Modify the objective function matrix (C).
double EvaluateConstraint(const size_t index, const arma::mat &coordinates) const
Evaluate a particular constraint of the LRSDP at the given coordinates.
void Gradient(const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of the Augmented Lagrangian function.
size_t NumConstraints() const
Get the number of constraints in the LRSDP.
const arma::vec & B() const
Return the vector of B values.
double Evaluate(const arma::mat &coordinates) const
Evaluate the objective function of the LRSDP (no constraints) at the given coordinates.
std::vector< arma::mat > a
A_i for each constraint.
void GradientConstraint(const size_t index, const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of a particular constraint of the LRSDP at the given coordinates.
std::vector< arma::mat > & A()
Modify the veector of A matrices (which correspond to the constraints).
arma::vec b
b_i for each constraint.
const std::vector< arma::mat > & A() const
Return the vector of A matrices (which correspond to the constraints).
void Gradient(const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of the LRSDP (no constraints) at the given coordinates.
arma::uvec & AModes()
Modify the vector of modes for the A matrices.
std::string ToString() const
Return string representation of object.
const arma::mat & GetInitialPoint() const
Get the initial point of the LRSDP.
const arma::uvec & AModes() const
Return the vector of modes for the A matrices.
arma::uvec aModes
1 if entries in matrix, 0 for normal.
arma::vec & B()
Modify the vector of B values.
LRSDPFunction(const size_t numConstraints, const arma::mat &initialPoint)
Construct the LRSDPFunction with the given initial point and number of constraints.