13 #ifndef MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_FUNCTION_HPP 14 #define MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_FUNCTION_HPP 21 namespace optimization {
35 template <
typename SDPType>
46 const arma::mat& initialPoint);
60 const size_t numDenseConstraints,
61 const arma::mat& initialPoint);
67 double Evaluate(
const arma::mat& coordinates)
const;
73 void Gradient(
const arma::mat& coordinates, arma::mat& gradient)
const;
79 const arma::mat& coordinates)
const;
85 const arma::mat& coordinates,
86 arma::mat& gradient)
const;
95 const SDPType&
SDP()
const {
return sdp; }
98 SDPType&
SDP() {
return sdp; }
101 const arma::mat&
RRT()
const {
return rrt; }
104 arma::mat&
RRT() {
return rrt; }
111 arma::mat initialPoint;
120 const arma::mat& coordinates)
const;
124 const arma::mat& coordinates)
const;
128 const arma::mat& coordinates,
129 arma::mat& gradient)
const;
133 const arma::mat& coordinates,
134 arma::mat& gradient)
const;
140 #include "lrsdp_function_impl.hpp" 142 #endif // MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_FUNCTION_HPP LRSDPFunction(const SDPType &sdp, const arma::mat &initialPoint)
Construct the LRSDPFunction from the given SDP.
The objective function that LRSDP is trying to optimize.
void Gradient(const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of the LRSDP (no constraints) at the given coordinates.
The core includes that mlpack expects; standard C++ includes and Armadillo.
arma::mat & RRT()
Modify R*R^T matrix.
double Evaluate(const arma::mat &coordinates) const
Evaluate the objective function of the LRSDP (no constraints) at the given coordinates.
SDPType & SDP()
Modify the SDP object representing the problem.
size_t NumConstraints() const
Get the total number of constraints in the LRSDP.
const arma::mat & GetInitialPoint() const
Get the initial point of the LRSDP.
This is a utility class used by AugLagrangian, meant to wrap a LagrangianFunction into a function usa...
const arma::mat & RRT() const
Get R*R^T matrix.
double EvaluateConstraint(const size_t index, const arma::mat &coordinates) const
Evaluate a particular constraint of the LRSDP at the given coordinates.
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.
const SDPType & SDP() const
Return the SDP object representing the problem.