12 #ifndef MLPACK_CORE_OPTIMIZERS_PROBLEMS_SPHERE_FUNCTION_HPP 13 #define MLPACK_CORE_OPTIMIZERS_PROBLEMS_SPHERE_FUNCTION_HPP 18 namespace optimization {
72 double Evaluate(
const arma::mat& coordinates,
74 const size_t batchSize)
const;
81 double Evaluate(
const arma::mat& coordinates)
const;
91 void Gradient(
const arma::mat& coordinates,
94 const size_t batchSize)
const;
102 void Gradient(
const arma::mat& coordinates, arma::mat& gradient);
108 arma::Row<size_t> visitationOrder;
111 arma::mat initialPoint;
118 #endif // MLPACK_CORE_OPTIMIZERS_PROBLEMS_SPHERE_FUNCTION_HPP
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Evaluate(const arma::mat &coordinates, const size_t begin, const size_t batchSize) const
size_t NumFunctions() const
Return 1 (the number of functions).
void Shuffle()
Shuffle the order of function visitation.
void Gradient(const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize) const
arma::mat GetInitialPoint() const
Get the starting point.
SphereFunction(const size_t n)
The Sphere function, defined by.