mlpack  master
test_function.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_OPTIMIZERS_GD_TEST_FUNCTION_HPP
13 #define MLPACK_CORE_OPTIMIZERS_GD_TEST_FUNCTION_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace optimization {
19 namespace test {
20 
26 {
27  public:
30 
32  arma::mat GetInitialPoint() const { return arma::mat("1; 3; 2"); }
33 
35  double Evaluate(const arma::mat& coordinates) const;
36 
38  void Gradient(const arma::mat& coordinates, arma::mat& gradient) const;
39 };
40 
41 } // namespace test
42 } // namespace optimization
43 } // namespace mlpack
44 
45 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
The core includes that mlpack expects; standard C++ includes and Armadillo.
GDTestFunction()
Nothing to do for the constructor.
void Gradient(const arma::mat &coordinates, arma::mat &gradient) const
Evaluate the gradient of a function.
Very, very simple test function which is the composite of three other functions.
double Evaluate(const arma::mat &coordinates) const
Evaluate a function.
arma::mat GetInitialPoint() const
Get the starting point.