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>
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; }
104 const arma::mat& coordinates)
const;
108 const arma::mat& coordinates)
const;
112 const arma::mat& coordinates,
113 arma::mat& gradient)
const;
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 const SDPType & SDP() const
Return the SDP object representing the problem.
Linear algebra utility functions, generally performed on matrices or vectors.
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.
The objective function that LRSDP is trying to optimize.
SDPType sdp
SDP object representing the problem.
SDPType & SDP()
Modify the SDP object representing the problem.
The core includes that mlpack expects; standard C++ includes and Armadillo.
const arma::mat & GetInitialPoint() const
Get the initial point of the LRSDP.
double Evaluate(const arma::mat &coordinates) const
Evaluate the objective function of the LRSDP (no constraints) at the given coordinates.
arma::mat initialPoint
Initial point.
LRSDPFunction(const SDPType &sdp, const arma::mat &initialPoint)
Construct the LRSDPFunction from the given SDP.
void Gradient(const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of the LRSDP (no constraints) at the given coordinates.
This is a utility class used by AugLagrangian, meant to wrap a LagrangianFunction into a function usa...
size_t NumConstraints() const
Get the total number of constraints in the LRSDP.