13 #ifndef MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_FUNCTION_HPP
14 #define MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_FUNCTION_HPP
21 namespace optimization {
26 template <
typename SDPType>
38 const arma::mat& initialPoint);
52 const size_t numDenseConstraints,
53 const arma::mat& initialPoint);
59 double Evaluate(
const arma::mat& coordinates)
const;
65 void Gradient(
const arma::mat& coordinates, arma::mat& gradient)
const;
71 const arma::mat& coordinates)
const;
77 const arma::mat& coordinates,
78 arma::mat& gradient)
const;
87 const SDPType&
SDP()
const {
return sdp; }
90 SDPType&
SDP() {
return sdp; }
98 arma::mat initialPoint;
103 inline double AugLagrangianFunction<LRSDPFunction<SDP<arma::sp_mat>>>::Evaluate(
104 const arma::mat& coordinates)
const;
107 inline double AugLagrangianFunction<LRSDPFunction<SDP<arma::mat>>>::Evaluate(
108 const arma::mat& coordinates)
const;
111 inline void AugLagrangianFunction<LRSDPFunction<SDP<arma::sp_mat>>>::Gradient(
112 const arma::mat& coordinates,
113 arma::mat& gradient)
const;
116 inline void AugLagrangianFunction<LRSDPFunction<SDP<arma::mat>>>::Gradient(
117 const arma::mat& coordinates,
118 arma::mat& gradient)
const;
124 #include "lrsdp_function_impl.hpp"
126 #endif // MLPACK_CORE_OPTIMIZERS_SDP_LRSDP_FUNCTION_HPP
LRSDPFunction(const SDPType &sdp, const arma::mat &initialPoint)
Construct the LRSDPFunction from the given SDP.
const arma::mat & GetInitialPoint() const
Get the initial point of the LRSDP.
void Gradient(const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of the LRSDP (no constraints) at the given coordinates.
The objective function that LRSDP is trying to optimize.
The core includes that mlpack expects; standard C++ includes and Armadillo.
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.
SDPType & SDP()
Modify the SDP object representing the problem.
size_t NumConstraints() const
Get the total number of constraints in the LRSDP.
const SDPType & SDP() const
Return the SDP object representing the problem.
double Evaluate(const arma::mat &coordinates) const
Evaluate the objective function of the LRSDP (no constraints) at the given coordinates.